您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Link to a search from discogs pages to PTH
当前为
- // ==UserScript==
- // @name PTH search link on discogs
- // @version 0.3
- // @description Link to a search from discogs pages to PTH
- // @author Chameleon
- // @include http*://*discogs.com/*
- // @grant none
- // @namespace https://greasyfork.org/users/87476
- // ==/UserScript==
- (function() {
- 'use strict';
- var pTitle=document.getElementById('profile_title');
- if(pTitle)
- {
- var album = pTitle.getElementsByTagName('span');
- album=album[album.length-1].textContent.trim();
- var span=pTitle.getElementsByTagName('a')[0].parentNode;
- var artist=span.getAttribute('title').replace(/\(.*\)/g, '');
- var a=document.createElement('a');
- a.href="https://passtheheadphones.me/artist.php?artistname="+artist;
- a.innerHTML = "pth";
- span.appendChild(document.createTextNode(' ('));
- span.appendChild(a);
- span.appendChild(document.createTextNode(')'));
- var a=document.createElement('a');
- a.href="https://passtheheadphones.me/torrents.php?searchstr="+encodeURIComponent(artist+' '+album);
- a.innerHTML = "pth";
- pTitle.appendChild(document.createTextNode(' ('));
- pTitle.appendChild(a);
- pTitle.appendChild(document.createTextNode(')'));
- }
- })();