diff --git a/Douban2Piratebay.user.js b/Douban2Piratebay.user.js new file mode 100644 index 0000000..5078aff --- /dev/null +++ b/Douban2Piratebay.user.js @@ -0,0 +1,44 @@ +// ==UserScript== +// @name Douban2Piratebay +// @namespace http://tampermonkey.net/ +// @version 0.1 +// @description And direct link to piratebay from douban movie page. +// @author bitdust +// @match https://movie.douban.com/subject/* +// @grant none +// ==/UserScript== + +(function() { + 'use strict'; + + // Your code here... + function insertAfter(newNode, referenceNode) { + referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling); + } + var links = document.querySelectorAll ( + "#info > a" + ); + var imdblink = null; + var imdbRe = new RegExp("tt[0-9]{4,}"); + for (var i=0;i