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 getCatPicture(){ | |
| return fetch('https://api.thecatapi.com/v1/images/search?size=full') | |
| .then(res => { | |
| return res.json(); | |
| }); | |
| } | |
| function replacePicsWithCatPics(){ | |
| var imageCollection = [].slice.call(document.getElementsByTagName('img')); | |
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
| [].slice.call(document.getElementsByTagName('span')).filter(el => el.id === "message" && el.innerText.match(/\?/)).map(el => el.innerText) |
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 getProducts(){ | |
| let productList = []; | |
| removeSmallStuff(); | |
| let products = [].slice.call(document.getElementsByTagName('li')).filter(el => el.getAttribute('class') === 'product'); | |
| products.forEach(getProductInfo); | |
| products.forEach(applyDiscount); | |
| function getProductInfo(product){ | |
| let productInfo = product.querySelectorAll('a')[1].innerText; | |
| let price = product.getAttribute('data-price') * 1; |
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
| ( | |
| /** | |
| * @param {Application} app | |
| */ | |
| function (app) { | |
| var HUE_MAX = 359; | |
| var RGB_MAX = 255; | |
| var HSV_MAX = 100; | |
| var jps = new JPS(); | |
| if (BridgeTalk.appName !== "photoshop") { |
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 app = new Application(); | |
| var { hue, saturation, light } = rgbToHsl(app.foregroundColor.rgb.red, app.foregroundColor.rgb.green, app.foregroundColor.rgb.blue) | |
| var stepsToTake = prompt("How many steps should be generated?", 2); | |
| var tempBased = prompt("'y' For do temperature based shading, 'n' for light based shading", 'y'); | |
| var stepAmount = prompt("What increment should each step take?", 20) | |
| /** |
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 unfollow() { | |
| [].slice.call(document.getElementsByTagName('*')).filter((el) => { | |
| return el.getAttribute('aria-label') === "Story options" | |
| }).forEach((el) => { | |
| el.click(); | |
| }); | |
| [].slice.call(document.getElementsByTagName('*')).filter((el) => { | |
| if (el.getAttribute("title")) { | |
| return el.getAttribute("title").match(/Unfollow.+/g) |
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: if (!document.getElementById("thatAltTextThar")) { | |
| var image = document.getElementsByClassName("spotlight")[0]; | |
| if (image) { | |
| var altText = image.getAttribute("alt"); | |
| if (altText) { | |
| var styleElement = document.createElement("span"); | |
| styleElement.setAttribute("style", "font-size: 2rem; position: absolute; color: white; left: 0; bottom: 0; line-height: 2rem; background: black; padding: .5rem;"),; | |
| styleElement.innerText = altText; | |
| styleElement.id = "thatAltTextThar"; | |
| image.parentElement.appendChild(styleElement); |
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
| if (!('remove' in Element.prototype)) { | |
| Element.prototype.remove = function () { | |
| if (this.parentNode) { | |
| this.parentNode.removeChild(this) | |
| } | |
| } | |
| }; | |
| function showDiscounts() { | |
| var minDiscount = 100; |
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:if(!('remove'in Element.prototype)){Element.prototype.remove=function(){if(this.parentNode){this.parentNode.removeChild(this)}}}function showDiscounts(){minDiscount=10;function getProducts(){return[].slice.call(document.getElementsByTagName('*')).filter(function(e){if(e.getAttribute("data-asin")!==null&&e.className!=="asinImage"){return true}return false})}function productHasDiscount(product){if(product.getAttribute("data-a-strike")!==null){return true}else if(product.children&&product.children.length){var prodHasDisc=false;[].slice.call(product.children).forEach(function(c){var discExists=productHasDiscount(c);if(discExists){prodHasDisc=true}});return prodHasDisc}return false}function showDiscount(){var discElements=[].slice.call(document.getElementsByTagName('*')).map(function(e){if(e.getAttribute("data-a-strike")!==null){return e.parentElement}return null}).filter(function(d){return d!==null});discElements.forEach(function(e){calcDiscount(e)});reorderItems(getProducts());function calcDiscount(pa |