Changeset 38832

Show
Ignore:
Timestamp:
02/06/11 20:44:20 (2 years ago)
Author:
NeoCat
Message:

Avoid double event handling in Opera with user.js

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • websites/twicli/twicli.js

    r38831 r38832  
    6464                document.body.appendChild(ifr); 
    6565                var d = ifr.contentWindow.document; 
     66                var cnt = 0; // 二重onload防止 
    6667                ifr[ifr.readyState/*IE*/ ? "onreadystatechange" : "onload"] = function() { 
    67                         if (this.readyState && this.readyState != 'complete') return; 
     68                        if (this.readyState && this.readyState != 'complete' || cnt++) return; 
    6869                        if (d.x) { 
    6970                                if (callback) callback.apply(this, d.x);