#11560 - Un brin de veille #22 Maxlab
Plein de liens pour le JS, HTML et des libs. Miam !
// ==UserScript==
// @name Add all trackers on magnet links
// @namespace Trackes
// @include *
// @version 1
// @grant none
// ==/UserScript==
var trackers = [
"udp://tracker.openbittorrent.com:80/announce",
"udp://tracker.publicbt.com:80/announce",
"udp://open.demonii.com:1337/announce",
"udp://tracker.istole.it:80/announce",
"udp://tracker.prq.to/announce"
];
var links = document.getElementsByTagName('a');
for (var i = 0, n = links.length; i < n; i++) {
if (links[i].href.match(/^magnet:\?xt=/i) != null) {
links[i].href = links[i].href+"&tr="+trackers.join("&tr=");
}
}
// ==UserScript==
// @name Youtube Parameters Stripper
// @namespace lehollandaisvolant.net
// @description Removes ?feature* parametes on Youtube
// @include http://*.youtube.com/watch*
// @include https://*.youtube.com/watch*
// @version 1
// ==/UserScript==
(function() {
var sp = window.location.search.replace(/^\?/,'').split('&'), sk = [];
for(var i =0; i < sp.length; i++) {
if(!/^(?:feature|annotation_id|src_vid|NR)$/i.test(sp[i].split('=')[0])) {
sk.push(sp[i]);
}
}
var newurl = window.location.protocol + '//' + window.location.host
+ window.location.pathname + (sk.length?'?'+sk.join('&'):'')
+ window.location.hash;
if(newurl != window.location.href) {
(!!(window.history && window.history.pushState)
?window.history.pushState(null,null, newurl)
:window.location.replace(newurl)
);
}
})();