Backlink for pixiv

By SD-DAken Last update Apr 11, 2009 — Installed 90 times. Daily Installs: 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0

There are 1 previous version of this script.

// ==UserScript==
// @author         Andreas Jung (sd-daken.deviantart.com)
// @name           Backlink for pixiv
// @namespace      http://www.w3.org/1999/xhtml
// @description    This userscript adds a link back to the overview page from the full view page of an image
// @include        http://www.pixiv.net/member_illust.php?mode=big&*
// ==/UserScript==

// This file is licensed under Creative Commons Attribution License
//
// http://creativecommons.org/licenses/by/3.0/
//
// Initial Developer:
// Andreas Jung (sd-daken.deviantart.com)
//
// Contributor(s):
//

doc = document.location.href;
img = document.getElementsByTagName("img")[0];
parent = img.parentNode;

newhref = doc.replace(/mode=big/, "mode=medium");

link = parent.parentNode.appendChild(document.createElement("a"));
link.appendChild(document.createTextNode("back"));
link.setAttribute("href", newhref);
link.setAttribute("style", "font-size: 200%; font-family: 'Trebuchet MS', arial, sans-serif; font-weight:bold;");

parent.appendChild(document.createElement("br"));

parent.appendChild(img);

parent.parentNode.appendChild(parent);

style = document.getElementsByTagName("head")[0].appendChild(document.createElement("style"));
style.setAttribute("type", "text/css");
style.appendChild(document.createTextNode("*{margin: 2px !important; padding: 0px !important;}"));