Skip to content

Instantly share code, notes, and snippets.

Created October 7, 2015 11:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/f2dc58877af807aaa976 to your computer and use it in GitHub Desktop.
Save anonymous/f2dc58877af807aaa976 to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/cihaqofibo
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
(function () {
"use strict";
var payload = function () {
var elements = document.querySelectorAll('link[rel=stylesheet][href]');
for (var i = 0; i < elements.length; i++) {
var element = elements[i];
var href = element.href.replace(/[?&]t=([^&$]*)/,'');
element.href = href + (href.indexOf('?') >=0 ? '&' : '?') + 't=' + (new Date().getTime());
}
};
var wrapper = 'void (' + payload.toString() + ')();';
var url = 'javascript:' + encodeURIComponent(wrapper);
window.addEventListener("load", function () {
var a = document.createElement('a');
a.setAttribute("href", url);
a.setAttribute("rel", "bookmark");
a.setAttribute("title", "Recharger les feuilles de styles de la page");
a.appendChild(document.createTextNode("Recharger CSS"));
document.body.appendChild(a);
});
})();
</script>
<script id="jsbin-source-javascript" type="text/javascript">(function () {
"use strict";
var payload = function () {
var elements = document.querySelectorAll('link[rel=stylesheet][href]');
for (var i = 0; i < elements.length; i++) {
var element = elements[i];
var href = element.href.replace(/[?&]t=([^&$]*)/,'');
element.href = href + (href.indexOf('?') >=0 ? '&' : '?') + 't=' + (new Date().getTime());
}
};
var wrapper = 'void (' + payload.toString() + ')();';
var url = 'javascript:' + encodeURIComponent(wrapper);
window.addEventListener("load", function () {
var a = document.createElement('a');
a.setAttribute("href", url);
a.setAttribute("rel", "bookmark");
a.setAttribute("title", "Recharger les feuilles de styles de la page");
a.appendChild(document.createTextNode("Recharger CSS"));
document.body.appendChild(a);
});
})();</script></body>
</html>
(function () {
"use strict";
var payload = function () {
var elements = document.querySelectorAll('link[rel=stylesheet][href]');
for (var i = 0; i < elements.length; i++) {
var element = elements[i];
var href = element.href.replace(/[?&]t=([^&$]*)/,'');
element.href = href + (href.indexOf('?') >=0 ? '&' : '?') + 't=' + (new Date().getTime());
}
};
var wrapper = 'void (' + payload.toString() + ')();';
var url = 'javascript:' + encodeURIComponent(wrapper);
window.addEventListener("load", function () {
var a = document.createElement('a');
a.setAttribute("href", url);
a.setAttribute("rel", "bookmark");
a.setAttribute("title", "Recharger les feuilles de styles de la page");
a.appendChild(document.createTextNode("Recharger CSS"));
document.body.appendChild(a);
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment