Pixiv link

None

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey, Greasemonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

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.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name        Pixiv link
// @namespace   nani
// @description None
// @include     https://chan.sankakucomplex.com/post/show/*
// @include     https://gelbooru.com/index.php?page=post&s=view&id=*
// @include     http://gelbooru.com/index.php?page=post&s=view&id=*
// @run-at      document-end
// @version     0.1.1
// @grant       none
// ==/UserScript==
var origlink = document.body.querySelector('[href*="i.pximg.net"]').getAttribute("href");
var changedlink = origlink.replace(/.+(?:i\.pximg\.net)\/img-original\/img\/(?:\d+\/)+(.+)_p(?:\d+)\.(?:.+)/, "$1"); 
var div = document.getElementById('stats');
var creatediv = document.createElement("div");
creatediv.innerHTML = "Source correction: <a href=http://www.pixiv.net/member_illust.php?mode=medium&illust_id=" + changedlink + ">Pixiv</a>";
div.appendChild(creatediv);