Standard escape codes are prefixed with Escape
:
- Ctrl-Key:
^[
- Octal:
\033
- Unicode:
\u001b
- Hexadecimal:
\x1B
- Decimal:
27
As far as I am aware the time has come and as of Firefox 72 XUL has been stripped from firefox and so the method used to inject this scrollbar theme is no longer supported -- reference the following for future scroll themes:
Mozilla is currently working to phase out the APIs used to make this theme work. I will try to maintain each version until that time but eventually there will be no workaround. When that time comes there is a new, but more limited api for applying simple themes to scrollbars. In nightly I am currently using the following userContent.css
:root{
scrollbar-width: thin;
scrollbar-color: rgb(82, 82, 82) rgb(31, 31, 31);
}
<?xml version="1.0" encoding="utf-8"?> | |
<!-- | |
This configuration file is required if iisnode is used to run node processes behind | |
IIS or IIS Express. For more information, visit: | |
https://github.com/tjanczuk/iisnode/blob/master/src/samples/configuration/web.config | |
--> | |
<configuration> | |
<system.webServer> |
// centering doesn't work I don't care fuck you sideways | |
Element.prototype.scrollIntoViewIfNeeded = function (centerIfNeeded) { | |
var box = this.getBoundingClientRect(), | |
parentNode = this.parentNode, | |
parent = parentNode.getBoundingClientRect(); | |
var above = box.top < parent.top, | |
below = box.bottom > parent.bottom, | |
toRight = box.right > parent.right, | |
toLeft = box.left < parent.left; |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
// @license http://opensource.org/licenses/MIT | |
// copyright Paul Irish 2015 | |
// Date.now() is supported everywhere except IE8. For IE8 we use the Date.now polyfill | |
// github.com/Financial-Times/polyfill-service/blob/master/polyfills/Date.now/polyfill.js | |
// as Safari 6 doesn't have support for NavigationTiming, we use a Date.now() timestamp for relative values | |
// if you want values similar to what you'd get with real perf.now, place this towards the head of the page | |
// but in reality, you're just getting the delta between now() calls, so it's not terribly important where it's placed |
// A simple Linear Congruential Generator | |
// Establish the parameters of the generator | |
var m = 25, | |
// a - 1 should be divisible by m's prime factors | |
a = 11, | |
// c and m should be co-prime | |
c = 17; | |
// Setting the seed | |
var z = 3; |
// Linear Congruential Generator | |
// Variant of a Lehman Generator | |
var lcg = (function() { | |
// Set to values from http://en.wikipedia.org/wiki/Numerical_Recipes | |
// m is basically chosen to be large (as it is the max period) | |
// and for its relationships to a and c | |
var m = 4294967296, | |
// a - 1 should be divisible by m's prime factors | |
a = 1664525, | |
// c and m should be co-prime |
function endianness () { | |
var b = new ArrayBuffer(4); | |
var a = new Uint32Array(b); | |
var c = new Uint8Array(b); | |
a[0] = 0xdeadbeef; | |
if (c[0] == 0xef) return 'LE'; | |
if (c[0] == 0xde) return 'BE'; | |
throw new Error('unknown endianness'); | |
} |
/** | |
* Add dataset support to elements | |
* No globals, no overriding prototype with non-standard methods, | |
* handles CamelCase properly, attempts to use standard | |
* Object.defineProperty() (and Function bind()) methods, | |
* falls back to native implementation when existing | |
* Inspired by http://code.eligrey.com/html5/dataset/ | |
* (via https://github.com/adalgiso/html5-dataset/blob/master/html5-dataset.js ) | |
* Depends on Function.bind and Object.defineProperty/Object.getOwnPropertyDescriptor (polyfills below) | |
* All code below is Licensed under the X11/MIT License |