csdn close notice

try to take over the world!

Version vom 02.01.2019. Aktuellste Version

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

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 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.

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

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         csdn close notice
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://blog.csdn.net/*
// @grant        none
// ==/UserScript==

(async function() {
    'use strict';

    function sleep(ms) {
        return new Promise(resolve => setTimeout(resolve, ms));
    }

    var a = $(".btn-close");
    var m = $("#btn-readmore");

    var counter = 0;
    while (a.length == 0 || m.length == 0) {
        await sleep(2000);
        counter ++;
        if (counter > 16) {
            console.log('Waited 32 seconds, exiting...');
            return -1;
        }
        console.log("Length: a:", a.length, "m:", m.length);
    }

    for (var i = 0; i < a.length; i++) {
        a[i].click();
    }
    console.log("a clicked");
    m[0].click()
    console.log("m clicked");

    console.log("All Btns Clicked");
    return 0;
})();