The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.
Send messages to iframe using iframeEl.contentWindow.postMessage
Recieve messages using window.addEventListener('message')
// ==UserScript== | |
// @name n210-dl | |
// @namespace https://gist.github.com/hiroshil | |
// @version 0.1.1 | |
// @description Script used to download manga R18 on some domain of nhentai | |
// @license MIT | |
// @author hiroshil | |
// @source https://gist.github.com/hiroshil/86723bc557efa88931cf6b135e42a2b2 | |
// @match http*://nhentai.to/g/* | |
// @match http*://nhentai.xxx/g/* |
// ==UserScript== | |
// @name 210vn-dl | |
// @namespace https://gist.github.com/hiroshil | |
// @version 0.0.6 | |
// @description Script dùng để download manga R18 trên 1 domain của hentaivn | |
// @license MIT | |
// @author hiroshil | |
// @source https://gist.github.com/hiroshil/b85af14867493a72bd1cb24831bf0668 | |
// @include http*://*.*/*doc-truyen* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=hentaivn.icu |
// ==UserScript== | |
// @name tmo-dl | |
// @namespace https://gist.github.com/hiroshil | |
// @version 1.0 | |
// @description Script to download manga from TuMangaOnline | |
// @license MIT | |
// @author hiroshil | |
// @match https://visortmo.com/library/manga/*/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=visortmo.com | |
// @downloadURL https://gist.github.com/hiroshil/6c4360a56dd37a788646c468fe2ef7fc/raw/3fb7e6fde2dabe3fb4198eda17cce25db89c9dfa/tmo-dl.user.js |
// ==UserScript== | |
// @name View Image | |
// @namespace https://github.com/bijij/ViewImage | |
// @version 4.1.1 | |
// @description This userscript re-implements the "View Image" and "Search by image" buttons into google images. | |
// @author Joshua B | |
// @run-at document-end | |
// @include http*://*.google.com/search*tbm=isch* | |
// @include http*://*.google.com/imgres* | |
// @updateURL https://gist.github.com/hiroshil/857bb19163ebfe02134c5ab5fa2cd5e7/raw/viewimage.user.js |
var path = require("path"); | |
var globule = require('globule'); | |
var jsonlz4 = require('jsonlz4-decompress'); | |
var fs = require('fs'); | |
function getTabs() { | |
var fpath; | |
if (process.platform == "darwin") { | |
fpath = path.join(process.env.HOME, 'Library/Preferences'); | |
} else if (process.platform == "win32" || process.platform == "win64") { |
Usage Note: | |
----------- | |
// Just put this file in assets/javascripts and require it in application.js | |
// call function ajaxForm() on id of form containing file while submitting. | |
Do not use both ajaxSubmit and ajaxForm on the same form. These | |
functions are mutually exclusive. Use ajaxSubmit if you want | |
to bind your own submit handler to the form. For example, | |
#!/bin/bash | |
set -o errexit | |
set -o nounset | |
set -o pipefail | |
target="${1:-/opt/sublime_merge/sublime_merge}" | |
check_sha() { | |
local sha_valid |
unsigned char* hexstr_to_char(const char* hexstr) | |
{ | |
size_t len = strlen(hexstr); | |
IF_ASSERT(len % 2 != 0) | |
return NULL; | |
size_t final_len = len / 2; | |
unsigned char* chrs = (unsigned char*)malloc((final_len+1) * sizeof(*chrs)); | |
for (size_t i=0, j=0; j<final_len; i+=2, j++) | |
chrs[j] = (hexstr[i] % 32 + 9) % 25 * 16 + (hexstr[i+1] % 32 + 9) % 25; | |
chrs[final_len] = '\0'; |