Difference between revisions of "Lang Favlet"

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

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