Script is throwing an error in Error Console
![]() ![]() |
I am just now seeing this in the error console. Error: /\/\/\s*@version\s+(.*)\s*\n/i.exec(xpr.responseText).replace is not a function
Was there an greasemonkey update that caused this or is there a conflict with another script out there? Thanks! |
![]() ![]() |
That error would mean that the file on the server you are requesting does not have a @version set. Perhaps there is something wrong with the connection (either on your side or a "Page Not Found" on the server). Furthermore, that line of script has since been modified, meaning that you are not using the up-to-date version of my script so that error could already be fixed. Anyway, did you know you could do this now: // ==UserScript== // @name PatentlyUseful for USPTO // @namespace kwgoodwin // @description Provides helpful links for Issued Patents and Patent Applications at the United States Patent Office ( USPTO ). Additional information available at PatentlyUseful.com. // @version 0.6.4 // @author Kirk W Goodwin // @copyright 2009, Kirk W Goodwin (http://www.patentlyuseful.com/) // @require http://sizzlemctwizzle.com/updater.php?id=45645 // @include http://patft*.uspto.gov/netacgi/* // @include http://appft*.uspto.gov/netacgi/* // ==/UserScript==With just that line everything is taken care of automatically. You don't need to include the update code yourself or wrap your metadata. Just make sure to change your version number with every update. Future updates to my code will only be available at that url. |
![]() ![]() |
I think there is a bug in the code, actually. exec(xpr.responseText) returns an array, which you cannot call replace() on. The script doesn't work unless I change the compare function to this: this.xversion=/\/\/\s*@version\s+(.*)\s*\n/i.exec(xpr.responseText);
That fix seems to be made on the http://sizzlemctwizzle.com/updater.php script but not on the userscripts.org script. |
![]() ![]() |
Scratch that. The source code for the script itself is correct, but the "How to use?" section of the documentation isn't up to date. |
![]() ![]() |
Jon Collins wrote: My bad man. I forgot to update that. Anyway I've finally updated the version hosted here if you prefer pasting the code in your script. |
![]() ![]() |
I'm actually using the @require method now as it is much cleaner, but I was trying to paste the code itself to test and fiddle. Got it all figured out now though! Thanks. |
![]() ![]() |
Jon Collins wrote: Yeah it is. I prefer it myself. Jon Collins wrote: Glad you got it working. |
![]() ![]() |
The Updater using the @require method is not working for me, i think it cant work for anyone..
|
![]() ![]() |
Bouvere wrote: You don't understand how an @require works. When you install a script with an @require the @required script is downloaded to your hard drive. Since the script is my updater code it contains the latest version number at the time of install. The script then check periodically to see if the version number on the server is different from the version number stored on your hard drive. It does work. I can confirm this personally. If it isn't working for you then you aren't using it properly. |
![]() ![]() |
I think the main problem was, that i used 1.1a Version Numbers, instead of 1.1.1 for example. This could be the problem, now i got it to work properly. Thanks for the great script and sry for not understanding how it should work ^^ |
![]() ![]() |
Hello,
You can check the changes here... http://userscripts.org/scripts/show/95032 (search for your AnotherAutoUpdater) We should probably not use "this." in anonymous functions within GM_registerMenuCommand(). |


