Forum Posts

81105 posts

Apr 19, 2014
Watilin 453 posts

Topic: Script development / Prevent the browser from downloading images at all

tase:
except your example uses a forEach on a NodeList

Right! I haven’t checked my code, my apologies. I edited my code above to fix it.

tase:
I tried doing $(“#targetDiv”) but it says the node is null […] I assume it’s because the div in question isn’t even created yet ?

Exact. I’ve been in this situation before and I’ve chosen to use 2 mutation observers in cascade.

  1. A first observer that watches for the insertion of the target
  2. When the target’s insertion has been detected, stop the 1st observer
  3. Create a 2nd observer and start observing insertions into the target.

I don’t pretend it’s the best way of doing it.

erosman:
You can also use Adblock Plus with a rule to prevent images from loading on certain pages.

This is indeed a good idea. Adblock [Plus] is way more powerful than most people think.

 
Apr 19, 2014
Jefferson Scher 1865 posts

Topic: Userscripts.org discussion / Location is invalid

Maybe the script file name needs to follow the convention of ending with .user.js in order to be accepted.

 
Apr 19, 2014
erosman 490 posts

Topic: Script development / Userscript vs extension

e1839400@drd... wrote:
Is your signature or do you put it every time?
lol .... no, it is a smiley/emoticon.... try this script that I wrote: Userscripts.org Forum Emoticons
 
Apr 19, 2014
e1839400@drd... 57 posts

Topic: Script development / Userscript vs extension

Is :) your signature or do you put it every time?

 
Apr 19, 2014
erosman 490 posts

Topic: Script development / How to submit scripts here?

It seems you managed it (http://userscripts.org/scripts/show/462455)

:)

 
Apr 19, 2014
5moufl 18 posts

Topic: Userscripts.org discussion / Spam and malware

how about making a list?

 
Apr 19, 2014
decembre 362 posts

Topic: Userscripts.org discussion / Spam and malware

Empty topic

 
Apr 19, 2014
decembre 362 posts

Topic: Userscripts.org discussion / Spam and malware

Empty topic

 
Apr 19, 2014
decembre 362 posts

Topic: Userscripts.org discussion / Spam and malware

Empty topic

empty

 
Apr 19, 2014
decembre 362 posts

Topic: Userscripts.org discussion / Spam and malware

Empty topic

 
Apr 19, 2014
decembre 362 posts

Topic: Userscripts.org discussion / Spam and malware

Empty topic

 
Apr 19, 2014
decembre 362 posts

Topic: Userscripts.org discussion / Spam and malware

Empty topic

 
Apr 19, 2014
decembre 362 posts

Topic: Userscripts.org discussion / Spam and malware

Empty topic

 
Apr 19, 2014
decembre 362 posts

Topic: Userscripts.org discussion / Spam and malware

Empty topic

 
Apr 19, 2014
decembre 362 posts

Topic: Userscripts.org discussion / Spam and malware

Empty topic

 
Apr 19, 2014
decembre 362 posts

Topic: Userscripts.org discussion / Spam and malware

Ameena posted this spam.

List of LINK ?????

 
Apr 19, 2014
decembre 362 posts

Topic: Userscripts.org discussion / Spam and malware

Empty topic

 
Apr 19, 2014
decembre 362 posts

Topic: Userscripts.org discussion / Spam and malware

Empty topic

 
Apr 19, 2014
decembre 362 posts

Topic: Userscripts.org discussion / Spam and malware

Empty topic

 
Apr 19, 2014
decembre 362 posts

Topic: Userscripts.org discussion / Spam and malware

Empty topic

 
Apr 19, 2014
decembre 362 posts

Topic: Userscripts.org discussion / Spam and malware

Empty topic

 
Apr 19, 2014
decembre 362 posts

Topic: Userscripts.org discussion / Spam and malware

Empty topic

 
Apr 19, 2014
erosman 490 posts

Topic: Script development / Scriptupdate causes new script version

I see... now I understand

GM does not see the new update as an update.
Instead it sees it as a new script and attempts to install it. Since there is one with the same name there, it renames it.

Let me test it....

Update:
- I installed 0.9.1 ..it installed fine (although due to size, a bit slow) (Suggestion: 1400+ kbps bitrate for the audio file are really high quality for this purpose, you can reduce the bitrate and size by re-sampling at a lower rate OR try mp3 at 128kbps if there is no problem with using mp3)

- I upgraded to 0.9.2 and it went fine without any problem, duplication or renaming

It is possible that during the install and/or upgrade, the download gets corrupted so it is treated as a new install.

I have also noticed that sometimes GM forgets to remove scripts. Just now, I noticed one of my old scripts was still in the /gm_scripts folder although it did not appear in the list ;)

I also noticed some renames in my /gm_scripts folder
I think it happens when you try to install a new script with the same name. Instead of updating the old one, it treats it as a new install and renames.

I have had issues with GM crashing before (GreaseMonkey Misbehaving) and it is possible that it was the reason.

Sometimes mistakes in the code causes the GM to crash... for example empty include

// @include       

IMHO scripts & extension (and any programing) should have error-checking in EVERY stage ie

var a = document.getElementById('this');
if(!a) { 
  // some code to prevent errors
}

BTW, I manually fixed the renamed -1 folders by editing the config.xml (I dont like messy folders....lol)

 
Apr 19, 2014
Maxiking999 2 posts

Topic: Script development / Scriptupdate causes new script version

"Does the script update?"
-> Yes, I think so. I create a new firefox profile and download an older version and firefox announced there is an update.

"Does the resources update?"
-> No, the ressources (you mean the audio files, right?) are the same as before. I don't change them, that's allright.

Probably you don't understand my problem exact.
step-by-step:
1. download an old version of my script (here: 0.7.2, Feb 5, 2013 16:24) and use it so that the db is created
-> files in firefox_profile_folder\gm_scripts\
- SZS-Assistent\90%27s-Office-Phone.wav
- SZS-Assistent\550947.user.js
- SZS-Assistent\Gong.wav
- config.xml
- SZS-Assistent.db
2. now update to/install the next version (here: 0.7.3, Feb 14, 2013 14:57) and use it too
-> files in firefox_profile_folder\gm_scripts\
- SZS-Assistent\90%27s-Office-Phone.wav
- SZS-Assistent\Gong.wav
- SZS-Assistent-1\90%27s-Office-Phone.wav
- SZS-Assistent-1\553911.user.js
- SZS-Assistent-1\Gong.wav
- config.xml
- SZS-Assistent.db
- SZS-Assistent-1.db
(It also works with 0.9.1 to 0.9.2 (newest version) and the auto-update from firefox).

=> GM create a new script-folder and db-file
=> delete the old script-file but not the old ressources (audio files) and db

Off-topic: Thanks for suggestion, sounds logical, I will keep in mind.

 
Apr 19, 2014
decembre 362 posts

Topic: Userscripts.org discussion / Spam and malware

Empty topic