Archived Comments (locked)
|
|
The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008) |
|
|
does this script work??? never seen any changes/action |
|
|
Okay, I've got all the patches together in one bundle now. alien_scum needs to update his script!
--- scriptupdater.user.js.orig 2008-07-29 13:32:41.000000000 +0300
+++ scriptupdater.user.js 2008-07-29 13:32:47.000000000 +0300
@@ -29,12 +29,12 @@
-function xhr(uri,f,a,b,c) {GM_xmlhttpRequest({method: 'get',headers: {'User-agent': 'Mozilla/4.0 (compatible) Greasemonkey'},url: uri,onload:function(res){f(res.responseText,a,b,c)}});}
+function xhr(uri,f,a,b,c,d) {GM_xmlhttpRequest({method: 'get',headers: {'User-agent': 'Mozilla/4.0 (compatible) Greasemonkey'},url: uri,onload:function(res){f(res.responseText,a,b,c,d)}});}
function iframe(src,show) {var f=document.createElement('iframe');f.style.display=show?'inline':'none';f.src=src;return f;}
function hash(s){
- s=s.replace(/&/g,'&').replace(/&\w*;/g,'').replace(/[^\w(){}=.-+]/g,'');
+ s=s.replace(/&/g,'&').replace(/&\w*;/g,'').replace(/[^-\w(){}=.+]/g,'');
var h=0;
for (i=0;i<s><<3>>29)^s.charCodeAt(i);
return h
@@ -121,6 +121,7 @@
cnt++;
tr.appendChild(cE('td',name=n.getAttribute('name')));
tr.appendChild(cE('td',filename=n.getAttribute('filename')));
+ basedir=n.getAttribute('basedir');
if(n.getAttribute('enabled')=='false'){
tr.style.background='#EEEEEE';
tr.appendChild(cE('td','disabled'));
@@ -148,7 +149,7 @@
cnt--;
});
},tr.appendChild(cE('td')),name,n.getAttribute('namespace'));
- tr.appendChild(cE('td')).appendChild(iframe(profile+'gm_scripts/'+filename)).parentNode.style.display='none';
+ tr.appendChild(cE('td')).appendChild(iframe(profile+'gm_scripts/'+basedir+'/'+filename)).parentNode.style.display='none';
}
mes.innerHTML='looking on us.o for updates...';
window.setTimeout(function (){//waits for iframe to load
@@ -181,16 +182,15 @@
if(!/#scriptupdater/.test(location.href) && checkable()) {
scripts=getValue('scripts');
for(s in scripts){
- xhr(ckref(scripts[s].num),function(res,s){
- script=scripts[s];
- if (hash(res)!=script.hash) {
+ xhr(ckref(scripts[s].num),function(res,s,script_name,script_hash,script_num){
+ if (hash(res)!=script_hash) {
scpts=getValue('scripts');
scpts[s].hash=hash(res);
setValue('scripts',scpts);
- if(confirm('Update found for: \n'+script.name+'\n'+res.match(/@description\s*(.*)/)[1]))
- GM_openInTab(upref(script.num))
+ if(confirm('Update found for: \n'+script_name+'\n'+res.match(/@description\s*(.*)/)[1]))
+ GM_openInTab(upref(script_num))
}
- },s);
+ },s,scripts[s].name,scripts[s].hash,scripts[s].num);
}
}
}
|
|
|
I fixed it. The problem was the regexp on line 37. Use this:
A minus character that doesn't represent a range must be the first character in a character class except for a caret. Let me know if it works for you.... And then I found another bug. Working on it... |
|
|
Hi. I've tried the Line 89 and Line 128 fixes and added the patch from Eyal Soha just in case, but I get this error (before, between and after the changes): Error: invalid range in character class No line number, which doesn't help. Has anyone beaten this bug? P.S. Should probably add: This error appears with no action in the browser - no new tab, and no change to about:cache#scriptupdater when accessed directly. |
|
|
I have a simple script updater, check my scripts. |
|
|
I think that I fixed the bug that Ronen and I have seen. Looks like a race condition. Basically, the script is looking up multiple scripts for updates simultaneously and it gets confused because it is trying to access a variable that is global to the function. I read on a forum somewhere that the solution is to pass variables in to the function. Those are always copied, where as accessing a shared global isn't. Doesn't seem like it should help but it does. Anyway, the diff is below. Patch it in by hand or automatically and it should fix the bug. Worked for me in the few tests that I did. I hope that the author can incorporate this. Let me know if this works for you. Eyal
--- C:\Documents and Settings\eyals\Desktop\scriptupdater_old.js Mon Jun 02 16:56:57 2008
+++ C:\Documents and Settings\eyals\Desktop\scriptupdater_new.user.js Mon Jun 02 16:58:04 2008
@@ -29,7 +29,7 @@
-function xhr(uri,f,a,b,c) {GM_xmlhttpRequest({method: 'get',headers: {'User-agent': 'Mozilla/4.0 (compatible) Greasemonkey'},url: uri,onload:function(res){f(res.responseText,a,b,c)}});}
+function xhr(uri,f,a,b,c,d) {GM_xmlhttpRequest({method: 'get',headers: {'User-agent': 'Mozilla/4.0 (compatible) Greasemonkey'},url: uri,onload:function(res){f(res.responseText,a,b,c,d)}});}
function iframe(src,show) {var f=document.createElement('iframe');f.style.display=show?'inline':'none';f.src=src;return f;}
@@ -181,16 +181,15 @@
if(!/#scriptupdater/.test(location.href) && checkable()) {
scripts=getValue('scripts');
for(s in scripts){
- xhr(ckref(scripts[s].num),function(res,s){
- script=scripts[s];
- if (hash(res)!=script.hash) {
+ xhr(ckref(scripts[s].num),function(res,s,script_name,script_hash,script_num){
+ if (hash(res)!=script_hash) {
scpts=getValue('scripts');
scpts[s].hash=hash(res);
setValue('scripts',scpts);
- if(confirm('Update found for: \n'+script.name+'\n'+res.match(/@description\s*(.*)/)[1]))
- GM_openInTab(upref(script.num))
+ if(confirm('Update found for: \n'+script_name+'\n'+res.match(/@description\s*(.*)/)[1]))
+ GM_openInTab(upref(script_num))
}
- },s);
+ },s,scripts[s].name,scripts[s].hash,scripts[s].num);
}
}
}
|
|
|
Ronen, same here. The script claimed one script was old and then tried to update the other. When I used about:config#scriptupdater , it said that everything was up-to-date. Weird. |
|
|
This script doesn't work at all. |
|
|
hi I replaced the line 128:
with } else xhr('http://userscripts.org/scripts/search?q='+name.replace(/[^a-zA-Z0-9]+| {2,}/g," "),function(res,p,s,ns){ because it didn't find any of my scripts ;) |
|
|
cool thing. ;) |
|
|
Its a great script with some problem.
|
|
|
grrrr i'm an idiot... so again:
|
|
|
aahh vise-versa. the first give no msgbox, but the second =D |
|
|
this doesnt help me, but i found out, that function getValue(query) {
|
|
|
After fixing line 89 the script works as its supposed to for me. |
|
|
hi i found a typo in line 89 of the latest version of your script ("profe" instead of "profile") this causes the problem reported by "Nyks". |
|
|
Scratch that it keeps trying to install new versions of a script I already removed. |
|
|
I copied my profile to a xp machine to see it worked. about:cache#scriptupdater did what it was supposed to, there were updates to some of my scripts but it didn't automatically update them. I copied the profile back to my vista x86 machine and about:cache#scriptupdater still didn't work but it did automatically update a script, so at least I know its partially working. |
|
|
Hello! I installed the script (german XP with FF), and I get no errormessages.
When I call "about:cache#scriptupdater", I get a page with "Memory cache device ... List Cache Entries ... Disk cache device ... List Cache Entries". But I doesnt figure out, how to let the script autoupdate my scripts?!?! |
|
|
I seem to have the same problem as ladiko in both vista 32 and 64 |
|
|
any idea why it doesn't find Pagerization as a valid script on userscripts.org despite the fact that it is? other than that, script updater has been working great for me. what parameters does it use to determine if a script exists on this site? i know the problem might have something to do with the manner in which the other script is posted. i hope there's an easy solution. |
|
|
This script just doesn't seem to work for me. I'm running 2.0.0.5 firefox on Ubuntu |
|
|
Windows XP, Dutch version.
|
|
|
tried to run ff with admin rights --> nothing |