javaweb download

去广告

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         javaweb download
// @namespace    http://tampermonkey.net/
// @version      0.1
// @author       You
// @match        *://*.javaweb.shop/article/*
// @description 去广告
// ==/UserScript==

(function() {
    var p = /article\/(?<id>.*?).html/
    var requestUrl = window.location.href
    var groups = p.exec(requestUrl).groups
    if(groups.id){
        var downloadCacheStr = localStorage.getItem("_ARTICLE_DOWNLOAD_INFO_CACHE_")
        console.debug("origin [_ARTICLE_DOWNLOAD_INFO_CACHE_= "+downloadCacheStr+" ]")
        var newCahce = "{\""+groups.id+"\":true}"
        localStorage.setItem("_ARTICLE_DOWNLOAD_INFO_CACHE_",newCahce)
        console.info("success replace _ARTICLE_DOWNLOAD_INFO_CACHE_"+newCahce)
    }else{
        console.warn("error get article id from ["+requestUrl+"]")
    }
})();