Image missing and link attributes

in
Subscribe to Image missing and link attributes 5 posts, 2 voices



Erik Vold Scriptwright
FirefoxWindows

Hey Joe,

The image you are using seems to be missing, so I was thinking you could use https://www.paypal.com/en_US/i/btn/x-click-butc... instead. Also in case the image is missing could we add a couple of backups for the img tag:
1) add: onerror="this.src='..'" // this will use a backup image if the default image's server is down or if the image was removed.
2) add: alt="Paypal Donate"

Also for the link, can the following be added:
1) title="Donate to this scriptwright for further improvements"
2) target="_blank"
3) rel="external nofollow"

This is a great userscript, thanks!

 
JoeSimmons Script's Author
FirefoxWindows

Erik Vold wrote:
The image you are using seems to be missing
That's the donate image I created myself and it works fine.
Erik Vold wrote:
1) add: onerror="this.src='..'"
This can't be added due to uso's attribute filter.
Erik Vold wrote:
2) add: alt="Paypal Donate"
We can only have either a title or an alt.
Erik Vold wrote:
1) title="Donate to this scriptwright for further improvements"
Done.
Erik Vold wrote:
2) target="_blank"
3) rel="external nofollow"
These also can't be added due to uso's attribute filter.
The donatecode var is there so you can just copy the code that paypal gives you and paste it there. Modifying it is the user's choice.
Erik Vold wrote:
This is a great userscript, thanks!
Thank you.
 
Erik Vold Scriptwright
FirefoxMacintosh

Hey Joe,

You seem to have two images:
1) One for donatecode: http://i34.tinypic.com/4l3m0l.png
2) One for olddonatecode: http://www.chargraph.com/josh/images/donate.png

Image 1 does not work for me, I get "Oops! This link appears to be broken." message from google toolbar when I try to go to the uri http://i34.tinypic.com/4l3m0l.png

Image 2 works, but the code is replacing it with image 1.

 
Erik Vold Scriptwright
FirefoxMacintosh

Also,

The alt="Paypal Donate" is for the 'img' tag, and will be displayed if the image src is not found

The title="Donate to this scriptwright for further improvements" is for the 'a' tag and is displayed on mouseover of the button.

Both of these can be used at the same time, and should be.

 
JoeSimmons Script's Author
FirefoxWindows

Erik Vold wrote:
Also,
The alt="Paypal Donate" is for the 'img' tag, and will be displayed if the image src is not found
The title="Donate to this scriptwright for further improvements" is for the 'a' tag and is displayed on mouseover of the button.
Both of these can be used at the same time, and should be.
They both work, just put the urls in your browser.

Here are both images:
Paypal Donate

They're both the same. I made that image, and put it on my website to host it. Then I figured, ah, should switch hosts since I have a limited bandwidth transfer, so I changed the host to tinypic but it's the same.
Erik Vold wrote:
Also,
The alt="Paypal Donate" is for the 'img' tag, and will be displayed if the image src is not found
The title="Donate to this scriptwright for further improvements" is for the 'a' tag and is displayed on mouseover of the button.
Both of these can be used at the same time, and should be.
Okay, using it. but still it's up to the user to do this since they use the code paypal gives them.