您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Open disqus comment in the forum when its timestamp is clicked
// ==UserScript== // @name DisqusTimestampForumlink // @version 0.2 // @description Open disqus comment in the forum when its timestamp is clicked // @author xy // @match https://disqus.com/* // @namespace https://gf.qytechs.cn/users/809293 // ==/UserScript== (function() { 'use strict'; function threadUrl(threadId, hash) { const apiKey = 'tWtbL1OV8by298LctEFv9ccPxqJ7DUCg5sS064ItLBAWl11EdFJYcHqIgiZCVvS1'; var link = 'https://disqus.com/home/discussion/'; /* global $ */ $.ajax({ type: 'GET', dataType: 'json', url: 'https://disqus.com/api/3.0/threads/details.json', data: { api_key: apiKey, thread: threadId, }, async: false, success: function(data) { var r = data.response; link += r.forum + '/' + r.slug + '/' + hash; }}); return link; } document.addEventListener('click', (event) => { const validPaths = ['/home/inbox/', '/by/']; const validClasses = ['card-comment-truncated', 'link-gray time']; var clicked = event.target; if (validPaths.some(s => window.location.href.includes(s)) && validClasses.some(s => clicked.className.includes(s))) { clicked.href = threadUrl(clicked.dataset.threadId, clicked.hash); }}); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址