Karma Plus

Add a link to the Karma URL in the user profile page

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name        Karma Plus
// @grant       none
// @include     http://forums.e-hentai.org/index.php?showuser=*
// @version 0.0.1.20150615030051
// @namespace https://greasyfork.org/users/2233
// @description Add a link to the Karma URL in the user profile page
// ==/UserScript==

var wnd = window
var doc = wnd.document
var loc = location
var href = loc.href

var $  = function(e, css) { if(!css) { css=e; e=doc }; return e.querySelector(css) }
var $$ = function(e, css) { if(!css) { css=e; e=doc }; return e.querySelectorAll(css) }

if(/\?.*&?\bshowuser=/.test(href)) {
    var a = doc.createElement('a')
    a.href = 'http://e-hentai.org/dmspublic/karma.php?u=' + href.match(/\?.*&?\bshowuser=(\d+)/)[1]
    a.text = 'Karma+'
    $('#profilename').appendChild(doc.createElement('br'))
    $('#profilename').appendChild(doc.createElement('br'))
    $('#profilename').appendChild(a)
}