24 lines
969 B
JavaScript
24 lines
969 B
JavaScript
const fs = require('fs');
|
|
let commonJs = fs.readFileSync('scratch/common.js', 'utf8');
|
|
let ggJs = fs.readFileSync('scratch/gg.js', 'utf8');
|
|
let galleryJs = fs.readFileSync('scratch/gallery_4159707.js', 'utf8');
|
|
|
|
global.document = { location: { hostname: 'hitomi.la' } };
|
|
global.window = global;
|
|
global.navigator = { platform: 'Win32', userAgent: 'Chrome' };
|
|
global.gg = {};
|
|
global.$ = function() { return { ready: function() {}, on: function() {}, remove: function() {} }; };
|
|
global.$.ajax = function() {};
|
|
|
|
eval(commonJs);
|
|
eval(ggJs);
|
|
eval(galleryJs);
|
|
|
|
const t1 = url_from_url_from_hash(galleryinfo.id, galleryinfo.files[0], 'webpbigtn', 'webp', 'tn');
|
|
const t2 = url_from_url_from_hash(galleryinfo.id, galleryinfo.files[0], 'bigtn', 'webp', 'tn');
|
|
const t3 = url_from_url_from_hash(galleryinfo.id, galleryinfo.files[0], 'webpsmallsmalltn', 'webp', 'tn');
|
|
|
|
console.log("t1 (webpbigtn):", t1);
|
|
console.log("t2 (bigtn):", t2);
|
|
console.log("t3 (webpsmallsmalltn):", t3);
|