A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.
One-line version to paste in your DevTools
Use $$ if your browser aliases it:
~ 108 byte version
| var parser = function(url) { | |
| var a = document.createElement('a'); | |
| a.href = url; | |
| var search = function(search) { | |
| if(!search) return {}; | |
| var ret = {}; | |
| search = search.slice(1).split('&'); | |
| for(var i = 0, arr; i < search.length; i++) { |
| /** | |
| * TextAreaExpander plugin for jQuery | |
| * v1.0 | |
| * Expands or contracts a textarea height depending on the | |
| * quatity of content entered by the user in the box. | |
| * | |
| * By Craig Buckler, Optimalworks.net | |
| * | |
| * As featured on SitePoint.com: | |
| * http://www.sitepoint.com/blogs/2009/07/29/build-auto-expanding-textarea-1/ |
| /* | |
| Flatten an array of arbitrarily nested arrays of integers into a flat array of integers | |
| [[1,2,[3]],4] -> [1,2,3,4] | |
| <object Array> arrayFlatten(<object Array>); | |
| */ | |
| function arrayFlatten ( ary, ret ) { | |
| ret = ret === undefined ? [] : ret; | |
| for (var i = 0; i < ary.length; i++) { | |
| if (Array.isArray(ary[i])) { | |
| arrayFlatten(ary[i], ret); |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> | |
| <style> | |
| .app__layout { | |
| position: absolute; | |
| width: 100%; | |
| height: 100%; |
| var sroll_interval = setInterval(() => { | |
| window.scrollTo(0,100000000); | |
| if (document.querySelectorAll('.soundList__item').length == 200) { | |
| clearInterval(sroll_interval); | |
| document.querySelectorAll('.soundList__item .sc-button-more').forEach((a,i) => { | |
| setTimeout(() => { | |
| a.click(); | |
| console.log(i); | |
| setTimeout(() => { | |
| var d = document.querySelector('.sc-button-download'); |
| #!/usr/bin/env node | |
| var fs = require('fs'); | |
| var request = require('request'); | |
| var cheerio = require('cheerio'); | |
| var _ = require('lodash'); | |
| var combo = ''; | |
| var res_count = 0; | |
| saveCombo().then(combo => { |
| window.copy = copy; | |
| (function(console){ | |
| console.save = function(data, filename){ | |
| if(!data) { | |
| console.error('Console.save: No data') | |
| return; | |
| } |
| #!/usr/bin/env node | |
| var fs = require('fs'); | |
| var $ = require('cheerio'); | |
| var sh = require('child_process').execSync; | |
| var indexs = []; | |
| for(let i=1; i<=221; i++) indexs.push(i); | |
| var combo_body = indexs.reduce((prev, index) => { |
| function download(url) { | |
| var a = document.createElement('a'); | |
| a.setAttribute('href', url); | |
| a.setAttribute('download', ''); | |
| a.click(); | |
| } |