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() { | |
| if (typeof window.onurlchange === 'function') { | |
| return; | |
| } | |
| const oldPushState = history.pushState; | |
| const oldReplaceState = history.replaceState; | |
| function fireUrlChange() { | |
| const event = new Event('urlchange'); |
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 toast(text, duration) { | |
| window.simpleToastTimer && clearTimeout(window.simpleToastTimer); | |
| const wrapStyle = | |
| "display: flex; justify-content: center; padding: 0.6rem 1rem; font-size: 1.5rem; color: #fff; background: rgba(0, 0, 0, 0.7); border-radius: 0.4rem; position: fixed; top: 50%; left: 50%; z-index: 100; transform: translate3d(-50%, -50%, 1px);", | |
| contentStyle = "max-width: calc(96vw - 2rem); overflow-wrap: break-word;", | |
| toastEleId = "__GM_toast", | |
| toastInnerHTML = `<div style="${wrapStyle}"><div style="${contentStyle}">${text}</div></div>`; | |
| let toastEl = document.getElementById(toastEleId); | |
| if (toastEl) toastEl.innerHTML = toastInnerHTML; | |
| else { |
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
| - pixiv: | |
| - https:\/\/i(?:-c?f)?\.pximg\.net | |
| - https://www.pixiv.net | |
| - Sina: | |
| - https?:\/\/\w+\.sinaimg\.cn | |
| - https://weibo.com |
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
| { | |
| "created_at": "Tue Nov 24 10:43:40 +0000 2020", | |
| "id": 1331186716795781000, | |
| "id_str": "1331186716795781122", | |
| "full_text": ". https://t.co/WNDBnBCjSp", | |
| "truncated": false, | |
| "display_text_range": [0, 1], | |
| "entities": { | |
| "hashtags": [], | |
| "symbols": [], |
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
| (async uid => { | |
| if (!uid) uid = prompt("Input Twitter user name or Pixiv UID:"); | |
| const GAS_ID = | |
| "AKfycbxTxbDpJj3RRfP7yIq06v7hP5zUJcBjanurZvsj37iBUtsGgYDkBGW6yl4tYIlIcxbr"; | |
| const urlPrefix = `https://script.google.com/macros/s/${GAS_ID}/exec?type=calibremetadata&id=`; | |
| let res = await (await fetch(`${urlPrefix}${uid}`)).text(); | |
| let tname, tid, pid; | |
| isPid = /^\d+$/.test(uid); | |
| try { | |
| res = JSON.parse(res); |
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
| (async () => { | |
| let n = 1000; //Page turning times | |
| let uid = "3139723905"; | |
| let cids = ["4208773252239704"]; | |
| let index = {}; | |
| /* http://m.peachring.com/weibo/user/3139723905/?next=${cid} | |
| * https://m.weibo.cn/${uid}/${cid} | |
| */ | |
| async function getHTML(id) { | |
| const res = await fetch( |
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
| setTimeout(function fn() { | |
| Array.prototype.filter | |
| .call(document.querySelectorAll("div"), (e, i) => { | |
| var t; | |
| try { | |
| t = e.querySelector("div > div > article").querySelector("span[dir]") | |
| .parentNode; | |
| if (t.lastChild.nodeValue == " 转推了") { | |
| t.parentNode.removeChild(t); | |
| t = true; |
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(){if("about:blank"==location.href)return;let d=document,a=d.createElement("script");a.src="//cdn.jsdelivr.net/npm/[email protected]/dist/html2canvas.min.js",d.body.appendChild(a),a.onload=function(){let t=prompt("Enter a DOM Object or just Selector:");if(t){try{t=eval(t)}catch(e){try{t=d.querySelector(t)}catch(t){if(t instanceof SyntaxError)return}}if("string"==typeof t||!(t instanceof HTMLElement))return;window.pageYOffset=0,d.documentElement.scrollTop=0,d.body.scrollTop=0;let f=[null,3],x=prompt("Enter your custom params (backgroundColor,scale):","null,3");x||(f=x.split(",")),html2canvas(t,{dpi:window.devicePixelRatio,backgroundColor:"null"===f[0]?null:f[0],scale:"0"===f[1]?0:f[1],useCORS:!0}).then(t=>{let e=t.toDataURL("image/png",1);window.open("","_blank").document.write(`<html><head></head><body><img src="${e}" style="width: 100%"></body></html>`)})}}}(); |