This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //javascript: | |
| function saveAs(link, filename) { | |
| var i = document.createElement("a"); | |
| i.download = filename; | |
| i.href = link; | |
| i.target = "_blank"; | |
| var o = document.createEvent("MouseEvent"); | |
| o.initEvent("click", !0, !0, window, 1, 0, 0, 0, 0, !1, !1, !1, !1, 0, null); | |
| i.dispatchEvent(o); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function saveAs(link, filename = "download") { | |
| var i = document.createElement("a"); | |
| i.download = filename; | |
| i.href = link; | |
| i.target = "_blank"; | |
| var o = document.createEvent("MouseEvent"); | |
| o.initEvent("click", !0, !0, window, 1, 0, 0, 0, 0, !1, !1, !1, !1, 0, null); | |
| i.dispatchEvent(o); | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| // install: `npm install pofile xlsx` | |
| const PO = require('pofile'); | |
| const XLSX = require('xlsx'); | |
| // settings | |
| const xlsFile = "text_chn_2017-04-11.xlsm"; | |
| const newxlsFile = `text_chn_2017-04-11-new.xlsm`; | |
| const poFile = "output.po"; | |
| const mode = "import"; // import or export |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var rdd = document.querySelector("#qqqq > iframe").contentDocument | |
| .querySelector("iframe").contentDocument.querySelector("#reader param[name='flashvars']"); | |
| var logParam = decodeURIComponent(rdd.value.match(/&logParam=.+/).reduce(() => {}).substr(10)); | |
| logParam = JSON.parse(logParam); | |
| delete logParam.isSendLog; | |
| console.log("duration: " + logParam.duration); | |
| function getEnc(playingTime, isdrag) { | |
| function md5(string) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| ) | |
| func main() { | |
| m := make([]int, 0, Fact(5)) | |
| nums := []int{1, 2, 7, 8} | |
| Perm(nums, 4, func(v []int) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| javascript: void!function(v, n) { | |
| var score = "[" + $('strong.rating_num').text() + "]"; | |
| var title = $('span[property="v:itemreviewed"]').text(); | |
| var mainname = title.split(" ")[0]; | |
| v = $(".subject").text().match(/又名: (.+)/); | |
| var altername = (title.split(" ").slice(1).join(" ") + (!v ? "" : " / " + v[1])).split(" / ").reduce(function(a, b) { | |
| return !a.match(/[^\x01-\xff]/) && a ? a : b | |
| }).replace(/[:,!'"]| - /g, "").replace(/ +/g, "."); | |
| var year = $('span.year').text().match(/\d+/)[0]; | |
| var size = "480p"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fs=require("fs"); | |
| var files = JSON.parse(fs.readFileSync("D:\\doc\\desktop\\game.x.json", "utf-8")).filter(a=>a.id<840); | |
| var level1_filted = files.filter(a => a.source.match(/"[^"\\\n]*(?:\\.[^"\\\n]*)*"/)); | |
| // reduce each file strings into {id:xx,data:[?]} | |
| var level2_reduced = level1_filted.reduce((du,entry) => | |
| { | |
| var data = entry.source.match(/(?:log\()?"[^"\\]*(?:\\.[^"\\]*)*"/g) | |
| .filter(a=>!a.startsWith("log")) | |
| .map(_=>{try{_=JSON.parse(_)}catch(e){};return _||"fuck"}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // javascript:void (function(a,d){d=document.createElement('script');d.src=a;document.body.appendChild(d)})('//cdn.staticfile.org/jquery/1.11.1/jquery.min.js'); | |
| var tmlist = $("#hiddenTmIds").val(); | |
| var tkid = location.search.match(/tkid=.+(?=&)/).reduce(a => a).substr(5); | |
| function fuckone(id, defer) { | |
| var f = function(resolve, reject) { | |
| $.get("/WebTraining/SubjectLibraryPractice/DoPractice.aspx?NodeType=K&tkid=" + tkid + "&mode=0&tm_id=" + id, function(data) { | |
| var rex = /var m_divTmnr = "题目内容:(.+?)";[\s\S]+var m_lblBzda = '(.+?)';[\s\S]+var p_Options = '(.*?)';/g; | |
| var m = rex.exec(data); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| javascript: | |
| void !function(v){var filename = "["+$('strong.rating_num').text()+"]" | |
| +$('span[property="v:itemreviewed"]').text().split(" ")[0]+"." | |
| +($('span[property="v:itemreviewed"]').text().split(" ").slice(1).join(" ") | |
| +(!$(".subject").text().match(/又名: (.+)/)?"": | |
| " / "+$(".subject").text().match(/又名: (.+)/)[1])).split(" / ") | |
| .reduce(function(a,b){return a.match(/[^\x01-\xff]/)?b:a} | |
| ) | |
| .replace(/[:,]| - /g,"").replace(/ +/g,".")+"." | |
| +$('span.year').text().match(/\d+/)[0]+"." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| javascript:var i=1,t=setInterval(function(o){o=document.createEvent("DeviceMotionEvent");o.initDeviceMotionEvent("devicemotion",!0,!0,null,{x:-24*i,y:-25*i,z:-26*i},null,20);window.dispatchEvent(o);i=-i},24) |
NewerOlder