您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
更加方便获取QQ音乐ID然后在暮光方块论坛分享
当前为
// ==UserScript== // @name 暮光方块论坛-QQ音乐分享助手 // @name:zh-TW 暮光方块论坛-QQ音乐分享助手 // @namespace https://bbs.tsfk.top // @version 2.0 // @description 更加方便获取QQ音乐ID然后在暮光方块论坛分享 // @description:zh-tw 更加方便获取QQ音乐ID然后在暮光方块论坛分享 // @author Karry // @match https://y.qq.com/n/yqq/song/*.html // @grant none // ==/UserScript== (function() { 'use strict'; function urlHtml(){ //获取url地址 var ts_href = window.location.href; var ts_mainText=""; //获取地址最后一个“/”的下标 var ts_indexof = ts_href.lastIndexOf("/"); //获取地址“/”之后的的内容 var ts_indexText = ts_href.substring(ts_indexof + 1); //获取地址“.html”的下标 var ts_htmlBeforeText = ts_indexText.indexOf(".html"); //获取 “/”到".html"之间的内容 ts_mainText = ts_indexText.substring(0, ts_htmlBeforeText); return ts_mainText; }; function myfun(){ $(".data__singer").append('<font color="red">如果要将此音乐分享到暮光方块论坛,请复制此代码:</font><text id="code">[QMUSIC]</text>[/QMUSIC]'); $("#code").append(document.innerText =(urlHtml())); } window.onload = myfun; // Your code here... })();