byfandom blog link

insert link to your own blog

Stan na 04-04-2016. Zobacz najnowsza wersja.

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

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

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         byfandom blog link
// @version      0.2
// @description  insert link to your own blog
// @namespace    https://greasyfork.org/users/36620
// @match        http*://*.byfandom.org/blogs*
// @grant        none
// ==/UserScript==
(function($) {
    $('body').ready(function() {
        var toblog = document.createElement('li');
        var link = document.createElement('a');
    
        var name = $('.ow_console_dropdown_hover a').attr('href');
        name = '/blogs/user/'+name.slice(name.lastIndexOf('/')+1);
        link.setAttribute('href',name);
    
        var view = document.createTextNode('view my blog');
        var span = document.createElement('span');
        span.appendChild(view);
        link.appendChild(span);
        toblog.appendChild(link);
    
        $('.ow_content_menu').append(toblog);
    });
})(window.jQuery);