您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
this is not a good idea 'cos all the article pages of the day must be loaded in background to get this little text...
当前为
// ==UserScript== // @name heiseTickerKommentare11 // @version 0.1.1 // @author _leBluem_ // @description this is not a good idea 'cos all the article pages of the day must be loaded in background to get this little text... // @info but its fun to see ;) // @grant none // @namespace http://greasyfork.icu/de/scripts/25552-heisetickerkommentare10/ // @match http://www.heise.de/newsticker/* // @match https://www.heise.de/newsticker/* // ==/UserScript== (function() { // add "Kommentare laden" link to date that calls GetComments $("h4.published.archiv_woche_published").each(function(){ var s = '<font size="1"> <a href="#" onclick="GetComments(this);return false;">Kommentare laden</a></font>'; $(this).append(s); }); // find all comments for this day window.GetComments = function GetComments(e){ // <archiv_woche_published><font><a> var ulist=$(e).parent().parent().next().children(); // clear all previous loaded comments $('span[id*="plugin-page-"]').each(function(){ $(this).remove(); }); // make a span-tag to hold the comments-tag var urls = []; var j = 0; $(ulist).each(function(){ if ( $(this).find('a').attr('href') ) { urls.push($(this).find('a').attr('href')); // #plugin-page-0 .. #plugin-page-1 .. #plugin-page-2 .. $(this).append('<font size="1"><span id="plugin-page-' + j++ + '"></span></font>'); } }); // make the span-tag actually load the comments-tag if ( urls.length > 0 ) { for (var i = 0; i<= urls.length; i++) { // var re = new RegExp(/Kommentare lesen(.*)\(([^)]+)\)/); // does not compute anywhere $("#plugin-page-"+i).load(urls[i] + " div.link_forum_beitrag.news p a"); } } }; })();