Exhentai Cookie登录

输入cookie后点击空白处登录

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         Exhentai Cookie登录
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  输入cookie后点击空白处登录
// @author       wlm3201
// @match        https://exhentai.org
// @match        https://e-hentai.org
// @icon         https://exhentai.org/favicon.ico
// ==/UserScript==

let log = console.log;
let textarea = document.createElement("textarea");
textarea.style.width = "100%";
textarea.style.height = "100px";
textarea.placeholder = `ipb_member_id: ipb_member_id
ipb_pass_hash: ipb_pass_hash
igneous: igneous`;
textarea.style.fontSize = "xx-large";
if (!document.body.children.length) document.body.appendChild(textarea);
let login = async e => {
  if (!textarea.value) return;
  (await cookieStore.getAll()).forEach(async c => await cookieStore.delete(c));
  cookieStore.set("yay", "louder");
  textarea.value
    .split("\n")
    .map(x => x.split(/[:=]/).map(x => x.trim()))
    .filter(x => x.length == 2)
    .forEach(([k, v]) => cookieStore.set(k, v));
  location.reload();
};
textarea.onblur = login;
textarea.onkeydown = e => {
  if (e.ctrlkey && e.key == "Enter") login(e);
};