您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Changes continue this thread links so that they load inline
当前为
- // ==UserScript==
- // @name Reddit link expander
- // @description Changes continue this thread links so that they load inline
- // @author James Skinner <spiralx@gmail.com> (http://github.com/spiralx)
- // @namespace http://spiralx.org/
- // @match *://*.reddit.com/r/*/comments/*
- // @version 0.2.0
- // @grant GM_getResourceURL
- // @run-at document-start
- // @resource spinner http://cdn2.inlinkz.com/load.gif
- // @resource expand http://www.iba-berlin.com/design/iba_berlin/javascript/partner_ajax/images/icon_expand.gif
- // @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.js
- // @require https://gf.qytechs.cn/scripts/7602-mutation-observer/code/mutation-observer.js
- // ==/UserScript==
- var spinnerUrl = GM_getResourceURL('spinner'),
- expandUrl = GM_getResourceURL('expand');
- var observer = new MutationSummary({
- callback: function(summaries) {
- //console.info('Added %d spans', summaries[0].added.length);
- summaries[0].added.forEach(function(elem) {
- var $span = jQuery(elem),
- $a = $span.children('a'),
- href = $a.prop('href');
- //console.log(href);
- jQuery('<img src="' + expandUrl + '">')
- .css({
- display: 'inline-block',
- height: '11px',
- width: '11px',
- 'min-height': '11px',
- 'min-width': '11px',
- position: 'relative',
- top: '1px',
- marginRight: '4px',
- visibility: 'visible'
- })
- .prependTo($a);
- $a
- .css('font-size', '1.1em')
- .one('click', function() {
- $span
- .removeClass('deepthread')
- .html('<img src="' + spinnerUrl + '">');
- jQuery.get(href, function(data) {
- var $page = jQuery(data),
- $child = jQuery('.nestedlisting > .comment > .child', $page);
- $span
- .parentsUntil('.comment')
- .last()
- .replaceWith($child);
- });
- return false;
- });
- });
- },
- rootNode: document.body,
- queries: [
- { element: 'span.deepthread' }
- ]
- });
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址