Test the performance of TreeWalker compared to other DOM walker methods. Ran each test 1000 times. Try it yourself.
Method Total ms Average ms
document.TreeWalker 911 0.911
Iterative Traverser 2945 2.945
// ==UserScript== | |
// @name Script name | |
// @description Description | |
// @namespace https://yourwebsite.com | |
// @version 0.1.0 | |
// @author Your name | |
// @license MIT | |
// @released 2016-10-18 | |
// @updated 2016-10-18 | |
// @match *://example.com/* |
// Example usage: Fetch it's own code from GitHub | |
JSONP( 'https://api.github.com/gists/1900694?callback=?', function( response ) { | |
console.log( 'JSONP function:', response.data.files['jsonp.js'].content ); | |
}); |
Test the performance of TreeWalker compared to other DOM walker methods. Ran each test 1000 times. Try it yourself.
Method Total ms Average ms
document.TreeWalker 911 0.911
Iterative Traverser 2945 2.945
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2012 Sindre Sorhus <http://sindresorhus.com> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
git checkout master | |
git checkout -b bug123 | |
git pull http://repourl.git branch | |
git log | grep "Author" | head -1 # get the author | |
git checkout master | |
git merge --squash bug123 | |
git commit -a --author="Author" --message="Close #1: Title. Fixes #666" | |
git push origin master |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2012 Sindre Sorhus <http://sindresorhus.com> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2012 Sindre Sorhus <http://sindresorhus.com> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
I use Sublime for everything text related, but it doesn't have any built-in way to preview my Markdown files.
This is how easy it is to preview in Mou:
My recommended JSHint options
JavaScript:
{
node: true,
browser: true,
es5: true,
esnext: true,
// ==UserScript== | |
// @name Dictionary | |
// @version 0.1 | |
// @author Sindre Sorhus | |
// @include * | |
// ==/UserScript== | |
document.documentElement.style.webkitFilter='blur(0.5px)'; |