function ready(fn) {
if (document.readyState !== 'loading') {
fn();
return;
}
document.addEventListener('DOMContentLoaded', fn);
}
ready(function(){
console.log("Removing extra links head");
var list = document.head.getElementsByTagName("link");
var num= list.length;
for ( let i = 0; i<num; i++){
if (list[i] !== undefined){
console.log("Found: "+list[i].rel);
if ((list[i].rel == "EditURI") || (list[i].rel == "pingback") || (list[i].rel == "alternate") || (list[i].rel == "https://api.w.org/")){
console.log("Removed: "+list[i].rel);
document.head.removeChild(list[i]);
}
}
}
})