Bookmark this code to run on other sites!
This file contains 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
// https://codepedia.info/javascript-export-html-table-data-to-excel | |
// @requires: https://unpkg.com/xlsx@0.15.1/dist/xlsx.full.min.js | |
let workbook = XLSX.utils.table_to_book(table, { sheet: '<Sheet Name>' }); | |
XLSX.writeFile(workbook, '<Sheet Name>.xlsx'); |
This file contains 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
// How to - Search for tweets on Twitter. Run the code below. Scroll (click mouse wheel for "auto") as long as needed | |
/** Tweet Search Scraper - Scrapes Tweets from the search results page: https://twitter.com/search | |
* | |
* Function $(query:string[, multiple:boolean[, container:Node]]) -> Array|Node | |
* # Returns an array or node using `querySelectorAll` or `querySelector` (respectively) | |
* | |
* Object Tweets | |
* // The main object, containing the scraped tweets | |
* Getter size -> Number |
This file contains 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 CONVERT_TEXT; | |
if(CONVERT_TEXT) | |
clearInterval(CONVERT_TEXT); | |
CONVERT_TEXT = setInterval(() => { | |
let $ = (selector, parent = document) => [...parent.querySelectorAll(selector)], | |
_ = ['common', 'uncommon', 'rare', 'veryrare', 'ultrarare']; | |
let container; |
This file contains 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
class Deck { | |
constructor(...suits) { | |
let self = [], | |
uuid = (...values) => values.join('-') + '-' + Math.random().toString(36).replace(/^\d*\./, '').slice(-4), | |
properties = { configurable: false, enumerable: false, writable: false }; | |
for(let suit of suits) { | |
// Cards that have 2 copies (suit-oriented) | |
for(let card of [1, 2, 3, 4, 5, 6, 7, 8, 9, 'A', 'B', 'C']) | |
self.push( |
This file contains 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
/** addBits(A, B, S?) | |
* @param A The first set of bits | |
{ BigInt | Number | String === /^[01]*$/ | Object == Array } | |
* @param B The second set of bits | |
{ BigInt | Number | String === /^[01]*$/ | Object == Array } | |
* @param S The signature boolean | |
= true -> Use signed mode (int) | |
= false -> Use unsigned mode (uint) | |
* @return String === /^[01]+$/ | |
*/ |
To make this a bookmark, go to Twitch, press
Ctrl + D
, and for the URL use the code below →
javascript:(()=>{let t=(t,e=document)=>{let i=[...e.querySelectorAll(t)];return i.length>1?{...i,first:i[0],last:i[i.length-1]}:{...i[0],first:i[0],last:i[0]}},e=1e3,i=60*e,n=!0,r=0,s=0,a=0,l=!1,o={get update(){return p.update=setInterval(w,3e3)},get writer(){return p.writer=setInterval(()=>m.innerText,30*e)}},c=t("#auto-community-points").first,u=t('#auto-community-points svg[class*="channelpoints"i], img[class*="channelpoints"i]').first,m=t('#auto-community-points [class$="animated-number"i]').first,p={update:null,writer:null},d={Watching:0,Actively_Watching:0,Earned:{Watching:5,Actively_Watching:15},Oldest:()=>Math.min.apply(null,Object.values(d).filter(t=>+t))},f=t=>null!=t,y=(...t)=>{for(let e of t)clearInterval(p[e])},h=(...t)=>{for(let e of t)o[e]},w=()=>{if(n&&(a=t('#auto-community-points [data-test-selector="community-points-summary"i]
This file contains 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 destruct, construct, roll, unroll, compress, decompress; | |
/* DO NOT USE for secure projects, there are only 32 possible outputs */ | |
/* The input (de/con)structors */ | |
/** Destructs (attempts to flatten) the input | |
* @parameter input: the input to flatten | |
*/ | |
destruct = (input) => { | |
if(input === undefined || input === null) |
This file contains 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 parseURL(url) { | |
if(url === undefined || url === null) | |
return {}; | |
var url = url.toString(), | |
data = url.match(/^((([^:\/?#]+):)?(?:\/{2})?)(?:([^:]+):([^@]+)@)?(([^:\/?#]*)?(?:\:(\d+))?)?([^?#]*)(\?[^#]*)?(#.*)?$/), | |
i = 0, | |
e = ""; | |
data = data || e; |
NewerOlder