A userstyle that makes you wait ten seconds before entering a Hacker News thread. I use stylus to manage mine.
.subtext {
display: inline-block;
background: linear-gradient(to left, transparent 50%, #f60 50%) right;A userstyle that makes you wait ten seconds before entering a Hacker News thread. I use stylus to manage mine.
.subtext {
display: inline-block;
background: linear-gradient(to left, transparent 50%, #f60 50%) right;| /** | |
| * License: GPLv2 | |
| * Created by Roger Los (rogerlos.com) | |
| * https://github.com/rogerlos | |
| */ | |
| jQuery( function ( $ ) { | |
| /** | |
| * Some values needed for this to work. The actual select is not set in this constant as jQuery won't | |
| * catch its value changing, in my experience... |
| // License: GPLv2+ | |
| var el = wp.element.createElement, | |
| registerBlockType = wp.blocks.registerBlockType, | |
| ServerSideRender = wp.components.ServerSideRender, | |
| TextControl = wp.components.TextControl, | |
| InspectorControls = wp.editor.InspectorControls; | |
| /* | |
| * Here's where we register the block in JavaScript. |
This content moved here: https://exploringjs.com/impatient-js/ch_arrays.html#quickref-arrays
| const response = await fetch(`https://catappapi.herokuapp.com/users/${userId}`) | |
| const data = await response.json() | |
| return data.imageUrl | |
| } |
| @mixin valid-quantity($quantity) { | |
| @if type-of($quantity) != 'number' { | |
| @error 'The "quantity" parameter must be a number!'; | |
| } | |
| @if not(unitless($quantity)) { | |
| @error 'The "quantity" parameter must not have a unit!'; | |
| } | |
| @if $quantity < 0 { | |
| @error 'The "quantity" parameter must be at least 0!'; | |
| } |
| /// poly-fluid-sizing | |
| /// Generate linear interpolated size values through multiple break points | |
| /// @param $property - A string CSS property name | |
| /// @param $map - A SASS map of viewport unit and size value pairs | |
| /// @requires function linear-interpolation | |
| /// @requires function map-sort | |
| /// @example | |
| /// @include poly-fluid-sizing('font-size', (576px: 22px, 768px: 24px, 992px: 34px)); | |
| /// @author Jake Wilson <[email protected]> | |
| @mixin poly-fluid-sizing($property, $map) { |
| /// linear-interpolation | |
| /// Calculate the definition of a line between two points | |
| /// @param $map - A SASS map of viewport widths and size value pairs | |
| /// @returns A linear equation as a calc() function | |
| /// @example | |
| /// font-size: linear-interpolation((320px: 18px, 768px: 26px)); | |
| /// @author Jake Wilson <[email protected]> | |
| @function linear-interpolation($map) { | |
| $keys: map-keys($map); | |
| @if (length($keys) != 2) { |
| <?php | |
| add_action( 'some_hook', 'maxslider_enqueue_slider_css' ); | |
| function maxslider_enqueue_slider_css() { | |
| $css = ''; | |
| // ... | |
| if ( true === $something ) { | |
| $css = 'body { background-color: ' . $color . '; }'; | |
| } |
| swPrecache.write(path.resolve(__dirname, `../public/service-worker.js`), { | |
| cacheId: `know-it-all`, | |
| filename: `service-worker.js`, | |
| stripPrefix: `public/`, | |
| staticFileGlobs: [ | |
| `public/app.*.js`, // don't include the polyfills version | |
| `public/*.{html,ico,json,png}`, | |
| ], | |
| dontCacheBustUrlsMatching: [ | |
| /\.(js|json)$/, // I'm cache busting js and json files myself |