I hereby claim:
- I am bnoctis on github.
- I am bnoctis (https://keybase.io/bnoctis) on keybase.
- I have a public key ASAVj58xcwj98twhnDBqlS7iy48uftkR4a_TvbTSKDdLSAo
To claim this, I am signing this object:
// ==UserScript== | |
// @name 苹果园 HTTPS 化脚本 | |
// @description 将页面内所有链接和表单的指向改为 HTTPS,保证全站升级到 HTTPS 前的安全性 | |
// @match https://www.goddessfantasy.net/* | |
// @match http://www.goddessfantasy.net/* | |
// @version 0.1.3 | |
// @updateURL https://gist.github.com/nc7s/4d8782b75dce60e2a6110afc8997604a/raw/goddessfantasy-https.user.js | |
// @downloadURL https://gist.github.com/nc7s/4d8782b75dce60e2a6110afc8997604a/raw/goddessfantasy-https.user.js | |
// ==/UserScript== |
#C Generated by copy.sh/life | |
x = 10, y = 10, rule = B3/S23 | |
5bo2bo$3b5o$3bobo$b2o2bo$o3bob2obo$2bo2b2ob2o$o4bo3bo$4b2ob3o$3o4bo$2o | |
bob2o! |
// Main site, https://scp-wiki.wikidot.com | |
[...document.querySelectorAll('.feature-block .content-panel')].map(p => ({ | |
feature: p.querySelector('.panel-heading').textContent.trim(), | |
title: p.querySelector('h4').textContent.trim(), | |
url: p.querySelector('h4 a').href, | |
authors: [...p.querySelectorAll('.printuser a')].map(a => ({ | |
name: a.textContent.trim(), | |
url: a.href | |
})), | |
featuredBy: p.querySelector('.panel-footer').textContent.trim().replace('Featured by ', '').replace(/and /g, '').split(', ') |
I hereby claim:
To claim this, I am signing this object:
function promiseAll(promises) { | |
return new Promise((resolve, reject) => { | |
let results = [], | |
position = 0, | |
fulfilled = 0, | |
resolved = false | |
for(let promise of promises) { | |
let promisePosition = position | |
if(promise instanceof Promise) { | |
promise.then(value => { |
; const [multiRequest, makeRequestFunc] = (() => { | |
let globalRequestPool = [], | |
globalProcessingPool = [], | |
globalMaxConcurrentRequests = 5, /* Give it a default */ | |
globalRequestFunc = null, | |
globalProcessPoolFunc = null | |
type RequestOptions = { | |
isGlobal: boolean, | |
requestFunc: Function |
direct_copy direct copy using language standard library
shell_copy direct copy using shell copy command
sha1_diff calculate sha1 hashes of both files using language standard library
shell_sha1_diff calculate sha1 hashes of both files using /usr/bin/sha1sum
shell_diff using diff programs like GNU diff or git-diff to determine difference
read_and_compare_whole read files as a whole and compare in-memory
read_and_compare_chunk read chunks of files and compare in-memory until differ or end
function isInternalLink(href) { | |
try { | |
/* full URL i.e. has protocol */ | |
let url = new URL(href) | |
return url.origin === window.location.origin | |
} catch { | |
return !href.startsWith('//') || | |
(href.startsWith('//') && (window.location.protocol + href).startsWith(window.location.origin)) | |
} | |
} |