Skip to content

Instantly share code, notes, and snippets.

💗
Coding...

Joan Alba Maldonado jalbam

💗
Coding...
Block or report user

Report or block jalbam

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jalbam
jalbam / performance.now-polyfill.js
Last active Aug 16, 2019
window.performance.now polyfill
View performance.now-polyfill.js
'use strict';
// @license http://opensource.org/licenses/MIT
// copyright Paul Irish 2015
// Added code by Aaron Levine from: https://gist.github.com/Aldlevine/3f716f447322edbb3671
// Some modifications by Joan Alba Maldonado.
// 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
// Gist: https://gist.github.com/jalbam/cc805ac3cfe14004ecdf323159ecf40e
@jalbam
jalbam / requestAnimationFrame-polyfill.js
Last active Nov 7, 2019
window.requestAnimationFrame polyfill (with high resolution timing, very precise)
View requestAnimationFrame-polyfill.js
'use strict';
// requestAnimationFrame polyfill by Erik Möller.
// Fixes from Paul Irish, Tino Zijdel, Andrew Mao, Klemen Slavic, Darius Bacon and Joan Alba Maldonado.
// Adapted from https://gist.github.com/paulirish/1579671 which derived from
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// Added high resolution timing. This window.performance.now() polyfill can be used: https://gist.github.com/jalbam/cc805ac3cfe14004ecdf323159ecf40e
// MIT license
// Gist: https://gist.github.com/jalbam/5fe05443270fa6d8136238ec72accbc0
@jalbam
jalbam / unfollow-non-followers-twitter.js
Last active Dec 11, 2019
Code to stop following those ones who are not following you back on Twitter and keeping those you want or follow anyone you want, with certain filters (working in July 2019)
View unfollow-non-followers-twitter.js
/*
Unfollow (stop following) those people who are not following you back on Twitter (or unfollow everyone if desired).
This will work for new Twitter web site code structure (it was changed from July 2019, causing other unfollow-scripts to stop working).
Instructions:
1) The code may need to be modified depending on the language of your Twitter web site:
* For English language web site, no modification needed.
* For Spanish language web site, remember to set the 'LANGUAGE' variable to "ES".
* For another language, remember to set the 'LANGUAGE' variable to that language and modify the 'WORDS' object to add the words in that language.
@jalbam
jalbam / print-usernames-twitter.js
Last active Aug 17, 2019
Code to show usernames of people you are following on Twitter, being able to choose certain filters to skip some users (and even skip followers or non-followers)
View print-usernames-twitter.js
/*
Show user names of people you are following on Twitter, being able to choose certain filters to skip some users (and even skip followers or non-followers).
This will work for new Twitter web site code structure (it was changed from July 2019).
Instructions:
1) The code may need to be modified depending on the language of your Twitter web site:
* For English language web site, no modification needed.
* For Spanish language web site, remember to set the 'LANGUAGE' variable to "ES".
* For another language, remember to set the 'LANGUAGE' variable to that language and modify the 'WORDS' object to add the words in that language.
You can’t perform that action at this time.