Changeset 7257
- Timestamp:
- 02/28/08 22:56:41 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/opera-userjs/minibufferbookmarkcommand.js
r7248 r7257 31 31 var TAG = '' 32 32 33 if (typeof ACCEPTABLE_DOMAIN_LIST === 'undefined') { 34 var ACCEPTABLE_DOMAIN_LIST = [ 35 'b.hatena.ne.jp', 36 'clip.livedoor.com', 37 'del.icio.us' 38 ]; 39 } 40 33 41 const MINIBUFFER_BOOKMARKCOMMAND = 'MINIBUFFER_BOOKMARKCOMMAND'; 34 42 if (window.parent != window) { 35 43 if (window.name && window.name == MINIBUFFER_BOOKMARKCOMMAND) { 36 window.opera.addEventListener( 'BeforeScript', function (e) { e.preventDefault(); }, false ); 37 window.opera.addEventListener( 'BeforeExternalScript', function (e) { e.preventDefault(); }, false ); 38 document.addEventListener("DOMContentLoaded", function() { 39 var html = (document.documentElement || document.body).outerHTML; 40 window.parent.document.postMessage(html); 41 }, false); 44 for(var n = 0; n < ACCEPTABLE_DOMAIN_LIST.length; n++) { 45 if (location.host != ACCEPTABLE_DOMAIN_LIST[n]) continue; 46 window.opera.addEventListener( 'BeforeScript', function (e) { e.preventDefault(); }, false ); 47 window.opera.addEventListener( 'BeforeExternalScript', function (e) { e.preventDefault(); }, false ); 48 document.addEventListener("DOMContentLoaded", function() { 49 var html = (document.documentElement || document.body).outerHTML; 50 window.parent.document.postMessage(html); 51 }, false); 52 break; 53 } 42 54 } 43 55 } else { … … 163 175 var hatenab = new function(){ 164 176 var self = this; 177 165 178 this.checkLogin = function(html){ 166 179 var input = $X('//input', html); … … 268 281 var livedoorclip = new function(){ 269 282 var self = this; 283 270 284 this.checkLogin = function(html){ 271 285 var login = $X('//form[@name="loginForm"]', html); … … 366 380 var delicious = new function(){ 367 381 var self = this; 382 368 383 this.checkLogin = function(html){ 369 384 return $X('id("header-auth-links")/a[@href="/logout"]', html).length;
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)