Commits

Anton Afanasyev committed 6ef2838 Merge

Merge with default

Comments (0)

Files changed (1)

autopagerize.user.js

 // @exclude        http://b.hatena.ne.jp/*
 // @exclude        http://www.facebook.com/plugins/like.php*
 // @exclude        http://api.tweetmeme.com/button.js*
+// @version        0.0.66
+// @updateURL      http://home.aa-fam.com/useful/userscripts/autopagerize/ap.txt
+// @icon           http://autopagerize.net/img/icons/icon_032.png
+// @grant          GM_getValue
+// @grant          GM_setValue
+// @grant          GM_addStyle
+// @grant          GM_log
+// @grant          GM_xmlhttpRequest
+// @grant          GM_registerMenuCommand
 // ==/UserScript==
 
 
-// version: 0.0.61 2011-11-07T19:18:11+09:00
+// version: 0.0.66 2012-08-31T18:23:34+09:00
 //
 // this script based on
 // GoogleAutoPager(http://la.ma.la/blog/diary_200506231749.htm) and
 
 
 var URL = 'http://autopagerize.net/';
-var VERSION = '0.0.61';
+var VERSION = '0.0.66'
 var DEBUG = false;//getPref("isDebug", false);
 var AUTO_START = true;
 var CACHE_EXPIRE = 24 * 60 * 60 * 1000; // day
     //if (this.state == 'enable')
     {
         this.request()
+        GM_addStyle('hr.autopagerize_page_separator {clear: both;}')
     }
 }
 
             self.error()
         },
         onload: function(res) {
-            if (res.finalUrl && location.host == res.finalUrl.split('/')[2]) {
-                self.requestLoad.apply(self, [res]);
-            } else {
-                log("loaded, but returned url not same as requested. Loaded: '" + res.finalUrl + "'; Requested: '" + location.host + "'");
-                self.error();
+            if (res.finalUrl) {
+                var url_s = res.finalUrl.split(/[\/\?]/);
+                if (url_s[0] == location.protocol && location.host == url_s[2]) {
+                    self.requestLoad.apply(self, [res]);
+                    return;
+                }
             }
+            log("loaded, but returned url not same as requested. Loaded: '" + res.finalUrl + "'; Requested: '" + location.host + "'");
+            self.error();
         }
     };
     AutoPager.requestFilters.forEach(function(i) { i(opt); }, this);