您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Filters Gizmodo/latest to just io9 articles
// ==UserScript== // @name Show io9 articles only // @namespace http://tampermonkey.net/ // @version 0.1 // @description Filters Gizmodo/latest to just io9 articles // @author You // @match https://gizmodo.com/latest // @match https://gizmodo.com/latest* // @icon https://www.google.com/s2/favicons?domain=gizmodo.com // @grant none // ==/UserScript== (function() { 'use strict'; //boilerplate greasemonkey to wait until jQuery is defined... function GM_wait() { if(typeof window.jQuery == 'undefined') { window.setTimeout(GM_wait, 100); } else { var $ = window.jQuery; var io9Articles = $('article').has('a[data-ga*="Front page click"]').has('a[href*="/io9/"]'); //io9Articles.css('background','red'); $('article').has('a[data-ga*="Front page click"]').not(io9Articles).css('display','none'); } } GM_wait(); var url = document.location.toString(); document.querySelector('html').addEventListener('DOMNodeInserted', function(ev){ var new_url = document.location.toString(); if (url == new_url) return; // already checked or processed url = new_url; GM_wait(); // run when URL changes }); })();