Upside Down
Convert text to appear upside-down with this simple JavaScript function. ...
Convert text to appear upside-down with this simple JavaScript function. ...
Here’s a couple of bookmarklets that I use regularly when developing web apps. I’ll add more to the list as I go. Adds the specified javascript file to the current page. javascript:(function(){var%20sUrl=prompt('Enter the URL for the script file to inject:');if(sUrl){var%20s=document.createElement('script');s.setAttribute('src',sUrl);document.getElementsByTagName('body')[0].appendChild(s);alert('Script%20injected!');}})(); Adds the specified css stylesheet file to the current page. javascript:(function(){var%20sUrl=prompt('Enter%20URL%20to%20Stylesheet');if(sUrl){var%20s=document.createElement('link');s.setAttribute('href',sUrl);s.setAttribute('rel','stylesheet');s.setAttribute('type','text/css');document.getElementsByTagName('head')[0].appendChild(s);alert('Stylesheet%20injected!');}})(); Parses the page and shows the list of all the colors used on the page. javascript:(function(){s=document.body.appendChild(document.createElement('script'));s.id='fs';s.language='javascript';void(s.src='https://slayeroffice.com/tools/color_list/color_list_moz.js');})()
My colleague, pasted an interesting javaScript idiom to our developer chat, some time ago, and it immediately caught my attention. If you cast an array literal to a number, prepending it with a ‘+’ operator, it will evaluate to 0. var a = +[]; // a is 0 Heh, something so logical, yet obscure, immediately inspired me to take this a bit further. ...