new Promise((resolve, reject) => {})
const getDinosaur = (name) => {
return new Promise((resolve, reject) => {
resolve({name})
$breakpoints: ( | |
'mobile': 375px, | |
'tablet': 768px, | |
'desktop': 1440px | |
) !default; | |
@function getBp() { | |
@return $breakpoints; |
// This is the default html and body font-size for the base rem value. | |
$rem-base: 16px !default; | |
$base-font-family: 'din-2014', Arial, sans-serif; | |
$fallback-font-family: Arial, sans-serif; | |
// --- Colors --- | |
$colors: ( | |
primary: ( | |
enterpriseGreen: #169a5a, |
$breakpoints: ( | |
mobile: 599px, | |
stablet: 767px, | |
tablet: 1023px, | |
desktop: 1279px, | |
wide: 1600px | |
); | |
@mixin breakpoint($breakpoint, $min: false) { | |
@if $min and map-has-key($breakpointsMin, $breakpoint) { | |
@media (min-width: map-get($breakpointsMin, $breakpoint)) { |
// Drops you in preview mode | |
javascript:(function() { | |
var d = document, l = d.location, s = l.search; | |
d.cookie = 'wcmmode=preview; path=/'; | |
if (l.href.includes('editor.html') || !l.href.includes('wcmmode=disabled')) { | |
s = s.replace(/[\?&]?wcmmode=\w*/g, ''); | |
l.href = l.origin + l.pathname.replace(/\/editor\.html/g, '') + s + (s ? '&' : '?') + 'wcmmode=disabled'; | |
} else { |
javascript:(function() { document.location = (document.location.href.search(/[?&]wcmmode=disabled/) < 0 ? document.location.href + (document.location.href.indexOf('?') < 0 ? '?' : (document.location.href.search(/\?./) < 0 ? '' : '&')) + 'wcmmode=disabled' : document.location.toString().replace(/wcmmode=disabled&?/, '')).replace(/[?&]$/, '');if(window.location.href.indexOf("cf#") > -1){location.reload();}})(); |
// ==UserScript== | |
// @name StyledTags | |
// @namespace http://tampermonkey.net/ | |
// @version 0.2 | |
// @description try to take over the world! | |
// @author You | |
// @match https://*.workflowy.com/* | |
// @icon https://www.google.com/s2/favicons?domain=workflowy.com | |
// @grant none | |
// ==/UserScript== |
// Run this in the F12 javascript console in chrome | |
// if a redirect happens, the page will pause | |
// this helps because chrome's network tab's | |
// "preserve log" seems to technically preserve the log | |
// but you can't actually LOOK at it... | |
// also the "replay xhr" feature does not work after reload | |
// even if you "preserve log". | |
function createPause() { | |
console.log('debugger breakpoint applied to beforeunload;'); |
# Assumes 3 sequential commits: | |
# | |
# 1. commit tagged "prettier-before" that added `prettier` depedency and `prettier` script your package.json | |
# 2. commit that actually ran `prettier` on your entire codebase for the first time | |
# 3. commit tagged "prettier-after" that fixes any minor issues caused by prettier (e.x. moving eslint-ignore or $FlowFixMe comments around), or just the next commit if there were none | |
# | |
# I recommend running these as individual commands, not as a script, in case of merge conflicts | |
# | |
# Checkout the non-pretty branch you want to merge | |
# (or optionally make a new branch with `git checkout -b $YOUR_BRANCH-prettier $YOUR_BRANCH`) |
// find the globals defined by the current page | |
(function(){ | |
var iframe = document.createElement('iframe'); | |
iframe.src = "about:blank"; | |
document.body.appendChild(iframe); | |
var windowVars = Object.keys(iframe.contentWindow); | |
var globalVars = Object.keys(window).filter(key => !windowVars.includes(key)); | |
console.log("global Vars:", globalVars); |