마나토끼 뷰어

i,j,k 키를 눌러보세요

Verzia zo dňa 16.04.2023. Pozri najnovšiu verziu.

Na nainštalovanie skriptu si budete musieť nainštalovať rozšírenie, ako napríklad Tampermonkey, Greasemonkey alebo Violentmonkey.

Na nainštalovanie skriptu si budete musieť nainštalovať rozšírenie, ako napríklad Tampermonkey, % alebo Violentmonkey.

Na nainštalovanie skriptu si budete musieť nainštalovať rozšírenie, ako napríklad Tampermonkey, % alebo Violentmonkey.

Na nainštalovanie skriptu si budete musieť nainštalovať rozšírenie, ako napríklad Tampermonkey alebo Userscripts.

Na inštaláciu tohto skriptu je potrebné nainštalovať rozšírenie, ako napríklad Tampermonkey.

Na inštaláciu tohto skriptu je potrebné nainštalovať rozšírenie správcu používateľských skriptov.

(Už mám správcu používateľských skriptov, nechajte ma ho nainštalovať!)

Na inštaláciu tohto štýlu je potrebné nainštalovať rozšírenie, ako napríklad Stylus.

Na inštaláciu tohto štýlu je potrebné nainštalovať rozšírenie, ako napríklad Stylus.

Na inštaláciu tohto štýlu je potrebné nainštalovať rozšírenie, ako napríklad Stylus.

Na inštaláciu tohto štýlu je potrebné nainštalovať rozšírenie správcu používateľských štýlov.

Na inštaláciu tohto štýlu je potrebné nainštalovať rozšírenie správcu používateľských štýlov.

Na inštaláciu tohto štýlu je potrebné nainštalovať rozšírenie správcu používateľských štýlov.

(Už mám správcu používateľských štýlov, nechajte ma ho nainštalovať!)

// ==UserScript==
// @name           마나토끼 뷰어
// @name:ko        마나토끼 뷰어
// @name:en        manatoki viewer
// @description    i,j,k 키를 눌러보세요
// @description:ko i,j,k 키를 눌러보세요
// @description:en press i to open
// @version        2212261729
// @match          https://*.net/comic/*
// @author         nanikit
// @namespace      https://greatest.deepsurf.us/ko/users/713014-nanikit
// @connect        *
// @grant          GM_xmlhttpRequest
// @grant          GM_getResourceText
// @grant          window.close
// @run-at         document-start
// @require        https://cdn.jsdelivr.net/npm/[email protected]/require.js
// @resource       @stitches/react  https://cdn.jsdelivr.net/npm/@stitches/[email protected]/dist/index.cjs
// @resource       fflate           https://cdn.jsdelivr.net/npm/[email protected]/lib/browser.cjs
// @resource       object-assign    https://cdn.jsdelivr.net/npm/[email protected]/index.js
// @resource       react            https://cdn.jsdelivr.net/npm/[email protected]/cjs/react.production.min.js
// @resource       react-dom        https://cdn.jsdelivr.net/npm/[email protected]/cjs/react-dom.production.min.js
// @resource       scheduler        https://cdn.jsdelivr.net/npm/[email protected]/cjs/scheduler.production.min.js
// @resource       vim_comic_viewer https://greatest.deepsurf.us/scripts/417893-vim-comic-viewer/code/vim%20comic%20viewer.js?version=1074462
// ==/UserScript==
// @deno-types="tampermonkey"
// deno-fmt-ignore-file
// deno-lint-ignore-file
'use strict';

if (typeof define !== 'function') {
  throw new Error('requirejs not found.');
}

requirejs.config({
  enforceDefine: true,
});

define('main', (require, exports, module) => {


// src/manatoki.user.ts
var import_vim_comic_viewer = require("vim_comic_viewer");
var registerEpisodeNavigator = () => {
  addEventListener("keydown", (event) => {
    var _a, _b, _c, _d, _e;
    const { ctrlKey, shiftKey, altKey } = event;
    if (ctrlKey || shiftKey || altKey || import_vim_comic_viewer.utils.isTyping(event)) {
      return;
    }
    switch (event.key) {
      case "h":
      case "ArrowLeft":
        (_b = (_a = document.getElementById("goPrevBtn")) == null ? void 0 : _a.click) == null ? void 0 : _b.call(_a);
        break;
      case "l":
      case "ArrowRight":
        (_d = (_c = document.getElementById("goNextBtn")) == null ? void 0 : _c.click) == null ? void 0 : _d.call(_c);
        break;
      case "m":
        (_e = document.querySelector(".view-good")) == null ? void 0 : _e.scrollIntoView({
          block: "center"
        });
        break;
    }
  });
};
var getUrl = (image) => {
  if (image.offsetParent === null) {
    return [];
  }
  const data = Object.values(image.dataset);
  return data.length ? data : [image.src];
};
var getUrls = () => {
  const imgs = document.querySelectorAll(
    "div.view-padding img"
  );
  const urls = [...imgs].flatMap(getUrl);
  return urls;
};
var comicSource = () => {
  registerEpisodeNavigator();
  const urls = getUrls();
  return urls;
};
var main = async () => {
  if (!location.origin.includes("manatoki")) {
    return;
  }
  (0, import_vim_comic_viewer.setGmXhr)(GM_xmlhttpRequest);
  await import_vim_comic_viewer.utils.waitDomContent(document);
  try {
    await (0, import_vim_comic_viewer.initialize)({ source: comicSource });
  } catch (error) {
    console.log(error);
  }
};
main();

});

for (const name of ["@stitches/react","fflate","object-assign","react","react-dom","scheduler","vim_comic_viewer"]) {
  const body = GM_getResourceText(name);
  define(name, Function('require', 'exports', 'module', body));
}

unsafeWindow.process = { env: { NODE_ENV: 'production' } };
require(['main'], () => {}, console.error);