Greasy Fork

Greasy Fork is available in English.

SmashingMagazine

Hide readed article

目前为 2016-10-21 提交的版本。查看 最新版本

// ==UserScript==
// @name     SmashingMagazine
// @description Hide readed article
// @include    http://www.smashingmagazine.com/*
// @include    https://www.smashingmagazine.com/*
// @require  http://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js
// @version 0.0.1.20161021164554
// @namespace http://greasyfork.icu/users/38384
// ==/UserScript==

jQuery(function() {

    jQuery.ajaxPrefilter( function (options) {
      if (options.crossDomain && jQuery.support.cors) {
        var http = (window.location.protocol === 'http:' ? 'http:' : 'https:');
        options.url = http + '//cors-anywhere.herokuapp.com/' + options.url;
      }
    });
    
    jQuery.get('http://www.mycodemyway.in/txt/sm.txt', function (response) {
    debugger;
        var res = response.split(",");
        var resLength = res.length;
        for (var i=0; i<resLength.length; i++) {
         jQuery("." + res[i] ).hide();
        }
    });
});