Skip to content

Instantly share code, notes, and snippets.

@kainy
Last active April 29, 2016 03:21
Show Gist options
  • Save kainy/e20c86ef945e79bc6f0298a302befe13 to your computer and use it in GitHub Desktop.
Save kainy/e20c86ef945e79bc6f0298a302befe13 to your computer and use it in GitHub Desktop.

Revisions

  1. kainy revised this gist Apr 29, 2016. 1 changed file with 8 additions and 5 deletions.
    13 changes: 8 additions & 5 deletions otitle.js
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,8 @@
    javascript: setInterval(function() {
    [].forEach.call(document.querySelectorAll('*[otitle]'), function(a) {
    a.style.outline = "2px solid #" + (~~(Math.random() * (1 << 12))).toString(16)
    }, 5);
    }, 100)
    javascript: (function() {
    [].forEach.call(document.querySelectorAll('*[otitle]'), function(a) {
    a.title= 'otitle内容:【 '+ a.getAttribute('otitle')+' 】';
    setInterval(function(){
    a.style.outline = "2px solid #" + (~~(Math.random() * (1 << 12))).toString(16)
    }, 100)
    }, 6);
    })();
  2. kainy created this gist Apr 29, 2016.
    5 changes: 5 additions & 0 deletions otitle.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    javascript: setInterval(function() {
    [].forEach.call(document.querySelectorAll('*[otitle]'), function(a) {
    a.style.outline = "2px solid #" + (~~(Math.random() * (1 << 12))).toString(16)
    }, 5);
    }, 100)