Skip to content

Instantly share code, notes, and snippets.

View NacimHarfouche's full-sized avatar
🎯
Focus

Nacim Harfouche NacimHarfouche

🎯
Focus
View GitHub Profile
@NacimHarfouche
NacimHarfouche / main.js
Last active December 26, 2019 21:35
Add rel="noopener noreferrer" to all <a> with target _blank or blank
(() => {
let linkBlanks = document.querySelectorAll('a[target*=blank]');
if (linkBlanks.length === 0) return;
for (let link of linkBlanks ) {
if (!/noopener/i.test(link.rel)) link.rel += " noopener";
if (!/noreferrer/i.test(link.rel)) link.rel += " noreferrer";
if (link.rel[0] === " ") link.rel = link.rel.slice(1);
}
})();
// ==UserScript==
// @name DC - MobileFixes
// @namespace http://tampermonkey.net/
// @version 0.12
// @description Fix player interactions with draggable boxes
// @author Ajira
// @match https://www.dreadcast.net/Main
// @grant none
// ==/UserScript==
(function numberCountUp() {
$('.js-countup').each(function () {
var year = $(this).text();
$(this).text(year - 80);
var tempyear = year - 80;
var self = this;
var scrollStart = () => {
if (( $(self).offset().top - 700) < $(window).scrollTop()) {
var interval = setInterval( () => {
if (tempyear < year) {