// Copy and paste each block into browser developer console or Sublime regex find/replace
// ALT tester -- displays the ALT text of images instead of the image.
var img=document.getElementsByTagName('img');
for(var i=0; i < img.length; i++){
img[i].setAttribute("src", "");
}
// Link checker -- displays the URLs for links beneath any links.
var a=document.getElementsByTagName('a');
for(var i=0; i < a.length; i++){
var src = a[i].getAttribute("href");
if (!src)
continue;
a[i].innerHTML += ("(" + src + ")");
var target = a[i].getAttribute("target");
if (!target || target !== "_blank"){
a[i].setAttribute("style", "color: red");
}
}
// Special character finder -- A simple regular expression to be used in a text editor to find special characters in text and HTML files
[^ -~\t\n\r]
// LINK_ID finder -- A simple regular expression to find LINK_IDs left over from extraction from DREAM. The leading space is important.
%LINK_ID=\w*
// ALT tester -- displays the ALT text of images instead of the image.
var img=document.getElementsByTagName('img');
for(var i=0; i < img.length; i++){
img[i].setAttribute("src", "");
}
// Link checker -- displays the URLs for links beneath any links.
var a=document.getElementsByTagName('a');
for(var i=0; i < a.length; i++){
var src = a[i].getAttribute("href");
if (!src)
continue;
a[i].innerHTML += ("(" + src + ")");
var target = a[i].getAttribute("target");
if (!target || target !== "_blank"){
a[i].setAttribute("style", "color: red");
}
}
// Special character finder -- A simple regular expression to be used in a text editor to find special characters in text and HTML files
[^ -~\t\n\r]
// LINK_ID finder -- A simple regular expression to find LINK_IDs left over from extraction from DREAM. The leading space is important.
%LINK_ID=\w*