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
| export class Vec { | |
| constructor(...values) { | |
| this.values = this.constructor.flatten(values); | |
| this.self = this; | |
| this.proxy = new Proxy(this, this.constructor.handler); | |
| return this.proxy; | |
| } | |
| static flatten(values) { | |
| const flatValues = []; | |
| for(const value of values) { |
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
| /* Get a markdown link to the current record | |
| * Copies it to clipboard, adds nav stuff to URL if there isn't any | |
| * Nice for Trello | |
| * e.g. [INC123456](whatever.service-now.com/...) | |
| */ | |
| javascript:(() => { let copy = text => { let input = document.createElement('textarea'); input.textContent = text; document.body.appendChild(input); input.select(); document.execCommand("copy"); input.remove(); }; let navUrl = (() => { let [, path] = /^https:\/\/.+\.service-now\.com(.+)$/.exec(location.href) || []; return path && path.match(/^\/nav/) ? location.href : location.origin + `/nav_to.do?uri=${encodeURIComponent(path)}`; })(); let number = document.title.split('|')[0].trim(); let out = `[${number}](${navUrl})`; copy(out); return undefined; })(); | |
| /* Get code for a GlideRecord that gets the current record | |
| * Copies it to clipboard so you can paste it into a BG script/Xplore/whatever | |
| */ |
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
| // adapted from https://stackoverflow.com/a/32838936 | |
| // (which was adapted from https://github.com/diafygi/webrtc-ips) | |
| getIPs = (doStun = false) => new Promise((resolve, reject) => { | |
| let RTCPeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection; | |
| let servers = {iceServers: doStun ? [{urls: "stun:stun.services.mozilla.com"}] : []}; | |
| let pc = new RTCPeerConnection(servers, {optional: [{RtpDataChannels: true}]}); | |
| let IPs = new Set(); | |
| pc.createDataChannel(""); //create a bogus data channel | |
| pc.createOffer(pc.setLocalDescription.bind(pc), () => {}); // create offer and set local description | |
| pc.onicecandidate = ice => { //listen for candidate events |
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
| // ==UserScript== | |
| // @name Scratch 3.0: Collapsible C-Blocks | |
| // @author NickyNouse | |
| // @include /^.*/vertical_playground.html?$/ | |
| // @grant none | |
| // @require https://airhogs777.github.io/sb3-theme/sb3-theme.js | |
| // ==/UserScript== | |
| (function() { | |
| 'use strict'; |
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
| // ==UserScript== | |
| // @name Unflat Scratch-Blocks | |
| // @version 0.1 | |
| // @description make Scratch-Blocks look more like Scratch 2.0 | |
| // @author NickyNouse | |
| // @include /^https?://.*/(vertical|horizontal)_playground.html?$/ | |
| // @grant none | |
| // ==/UserScript== | |
| (function() { |
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
| @-moz-document url-prefix("http://tosh.tjvr.org/app/") { | |
| body { | |
| background: #555; | |
| } | |
| #menu { | |
| box-shadow: 0 0 5px #000; | |
| color: #ddd; | |
| background: #888; | |
| } |
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
| @-moz-document url("https://scratch.mit.edu/") { | |
| @import url(https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css); | |
| /** page width -- if you nee a different width, just change this **/ | |
| body, #navigation { | |
| width: 500px; | |
| } | |
| #view, #view > .splash > .inner{ | |
| width: 100%; | |
| box-sizing: border-box; |
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
| // ==UserScript== | |
| // @name Kernt Events | |
| // @version 1 | |
| // @description Make all the kerning bad | |
| // @author NickyNouse | |
| // @match *://*/* | |
| // @grant none | |
| // ==/UserScript== | |
| 'use strict'; | |
| //from http://stackoverflow.com/a/29301739/1784306 |
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
| // ==UserScript== | |
| // @name :package2: adder | |
| // @version 0.1 | |
| // @description replaces :package2: with the bbcode for package | |
| // @author NickyNouse | |
| // @match https://scratch.mit.edu/discuss/* | |
| // @grant none | |
| // ==/UserScript== | |
| /* jshint -W097 */ | |
| 'use strict'; |
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
| // ==UserScript== | |
| // @name Scratch Project Analytics | |
| // @version 1 | |
| // @description adds engagement rates for a project's likes/fav's out of total views an to MyStuff | |
| // @author NickyNouse | |
| // @match https://scratch.mit.edu/projects/* | |
| // @match https://scratch.mit.edu/mystuf* | |
| // @grant none | |
| // ==/UserScript== |