您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Puts a link to the original recording allowing you to comment on it. Original recording opens in a new tab / window.
// ==UserScript== // @name SingSnap Duet Finder // @namespace http://www.manlymen.org/ // @author Anthony F. Miller // @version 0.1 // @description Puts a link to the original recording allowing you to comment on it. Original recording opens in a new tab / window. // @license GNU GPL v3 (http://www.gnu.org/copyleft/gpl.html) // @match http://www.singsnap.com/karaoke/record/record?duet_id=* // ==/UserScript== (function(){ var recordURL = window.location.href; var recordURLArray = recordURL.split("?"); for (var i=recordURLArray.length-1; i>0; i--) { urlElement = recordURLArray[i]; // Only run this if it's a duet (has a duet ID) if(urlElement.search("duet_id") != -1) { urlElementArray=urlElement.split("="); duetID = urlElementArray[1] // Create the link var a = document.createElement('a'); a.setAttribute('href','http://www.singsnap.com/karaoke/watchandlisten/play/' + duetID); a.innerHTML = 'Go to original link'; a.target = '_blank'; // Append the anchor to the chosen element ID document.getElementById('recording_step_display').appendChild(a); break; } } } )();