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
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height: 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
code --install-extension Angular.ng-template | |
code --install-extension BriteSnow.vscode-toggle-quotes | |
code --install-extension cssho.vscode-svgviewer | |
code --install-extension DotJoshJohnson.xml | |
code --install-extension eamodio.gitlens | |
code --install-extension EditorConfig.EditorConfig | |
code --install-extension eg2.tslint | |
code --install-extension formulahendry.auto-close-tag | |
code --install-extension formulahendry.auto-rename-tag | |
code --install-extension formulahendry.code-runner |
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
// https://www.w3.org/TR/SVG/text.html#AlignmentBaselineProperty | |
var props = {} | |
Array.from(document.querySelectorAll('.propdef')).map(property => { | |
const pn = property.querySelector('.propdef-title.prop-name'); | |
const propertyName = pn.innerText.replace(/[‘’]/ig, ''); | |
const options = property.querySelector('.propinfo tbody tr td:nth-child(2)').innerText.split(' | '); | |
props[propertyName] = options; | |
}) | |
let keys = Object.keys(props); | |
keys.map(key => { |
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
Array.from(document.querySelectorAll('*')).map(ele => { | |
if (parseInt(getComputedStyle(ele).zIndex)>0) { | |
ele.style.display = 'none' | |
} | |
}) |
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
Array.from(document.querySelectorAll('*')).map(ele => {ele.style.overflow = 'inherit';getComputedStyle(ele).zIndex>0 ? ele.remove() : null}) |
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 model = {name:document.querySelector('.localnav-header a').innerText, url:document.location.href, variants:[],memory:[]} | |
Array.from(document.querySelectorAll('.as-dimension-choices li')).map(size => { | |
let name = size.querySelector('label').innerText; | |
let ram, price; | |
let isPrice = size.querySelector('img')===null | |
if (isPrice) { | |
ram = size.querySelector('.as-dimension-capacity-text').innerText.split(' ')[0]; | |
price = parseFloat(size.querySelector('.price-point').innerText.split(' ')[0].replace('.','').replace(',','.')); | |
model.memory.push({ram,price}) | |
} 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
Object.prototype.toTimeString = function() { | |
var t = parseFloat(this); | |
var hou = (parseInt(t / 3600) % 24).toString().padStart(2, "0"), | |
min = (parseInt(t / 60) % 60).toString().padStart(2, "0"), | |
sec = parseInt(t % 60) | |
.toString() | |
.padStart(2, "0"); | |
return `${hou}:${min}:${sec}`; | |
}; |
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 source = document.documentElement.innerHTML; | |
var original = source.length | |
var saved = (original-(source.replace(/<!--.*?-->/g,'').replace(/\n/g,'').length)); | |
console.log("This page could be reduced by "+saved+" bytes, which is around "+Math.round(saved/original*100)+"%") |