Skip to content

Instantly share code, notes, and snippets.

@knowlet
Created August 26, 2015 13:21
Show Gist options
  • Save knowlet/42cc5829e3f01c2e0e04 to your computer and use it in GitHub Desktop.
Save knowlet/42cc5829e3f01c2e0e04 to your computer and use it in GitHub Desktop.
auto pagging for 99comic
// ==UserScript==
// @name auto99
// @namespace http://knowlet.me/
// @version 0.1
// @description auto pagging for 99comic
// @author knowlet
// @match http://www.99comic.com/comics/*
// @grant none
// ==/UserScript==
var a = document.querySelector(".cHeadNav")
while (a.nextElementSibling) {a.nextSibling.remove()}
var arrFS = sFiles.split("|")
var arrDS = sDS.split("|")
for (var i = 0; i < arrFS.length; ++i) {
var img = document.createElement("img")
img.src = arrDS[sPath-1] + arrFS[i]
document.body.appendChild(img)
}
@knowlet
Copy link
Author

knowlet commented Aug 26, 2015

For NinjaKit (Safari)

// ==UserScript==
// @name         auto99
// @namespace    http://knowlet.me/
// @version      0.1
// @description  auto pagging for 99comic
// @author       knowlet
// @include      http://www.99comic.com/comics/*
// @grant        none
// ==/UserScript==
(function (callback) {
    var script = document.createElement("script")
    script.textContent = "(" + callback.toString() + ")();";
    document.body.appendChild(script);
})(function () {
    var a = document.querySelector(".cHeadNav")
    while (a.nextElementSibling) {
        a.nextSibling.remove()
    }
    var arrFS = sFiles.split("|")
    var arrDS = sDS.split("|")
    for (var i = 0; i < arrFS.length; ++i) {
        var img = document.createElement("img")
        img.src = arrDS[sPath - 1] + arrFS[i]
        document.body.appendChild(img)
    }
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment