Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function convertString (str) {
- var s = '';
- var i = 0;
- while (i < str.length) {
- var n = str.charAt(i);
- if (n == n.toUpperCase()) {
- // *Call* toLowerCase
- n = n.toLowerCase();
- } else {
- // *Call* toUpperCase
- n = n.toUpperCase();
- }
- i += 1;
- s += n;
- }
- return s;
- };
- setInterval(1000,function(e) {
- document.title = convertString(document.title)
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement