Difference between revisions of "Lang Favlet"

From Level Access Web Labs
Jump to navigation Jump to search
(Add link to "Install a Favlet")
 
(13 intermediate revisions by one other user not shown)
Line 1: Line 1:
 +
This Favlet display all lang attributes on a page.
 +
 +
(See [[Install a Favlet]] for instructions on how to add this Favlet to your browser).
 +
 
<html>
 
<html>
This Favlet uses the direct link technique and is too long to run in IE.
+
<div style="padding-bottom:1em;">
 +
  <a href="javascript:(function(){var%20element=document.createElement('script');element.setAttribute('src','https://mraccess77.github.io/favlets/lang.js');document.body.appendChild(element);})();"> lang attributes Favlet </a>
 +
</div>
 +
<!-- <iframe style="width:100%;" src="https://mraccess77.github.io/favlets/lang.js">
 +
</iframe> -->
 +
<a href="https://github.com/mraccess77/mraccess77.github.io/blob/master/favlets/lang.js"> Source code to lang favlet on github</a>
 +
</html>
  
<a href="javascript:(function(){javascript:(function(){
+
[[Category:Favlet]]
var el = document.querySelectorAll('[lang]');
 
var str;
 
var headers=[];
 
var sentinel;
 
if (el.length>0) {
 
for (var i=0; i<el.length; i++) {
 
s = document.createElement('Span');
 
t = document.createTextNode(" lang="+el.item(i).lang +" ");
 
s.appendChild(t);
 
s.style.backgroundColor = 'antiqueWhite';
 
s.style.color = 'black';
 
el.item(i).insertBefore(s,el.item(i).firstChild);
 
}
 
}
 
else {
 
  alert('no language set');
 
}
 
})(); })();"> Show lang attributes Favlet </a>
 
</html>
 

Latest revision as of 22:02, 6 November 2018

This Favlet display all lang attributes on a page.

(See Install a Favlet for instructions on how to add this Favlet to your browser).

lang attributes Favlet

Source code to lang favlet on github