Recent posts by Descriptor
|
Mar 29, 2008
|
Topic: Script development / Userscripts Code Block Fix
Ahh, I see, but put them in <code> tags and it should work. test <input>, but I agree it should at least ignore tags that aren't accepted as markup code. Use &lt; for entities <
|
|
Mar 29, 2008
|
Topic: Script development / Problem Populating form Well, I just tried it as a "bookmarklet", but yes, it changes it to March. Also, znerp's code will get the correct form, based on the action attribute, in case some other form is dynamically added before that one. |
|
Mar 28, 2008
|
Topic: Script development / Problem Populating form Well, for the select lists you have to do it different, like
|
|
Mar 28, 2008
|
Topic: Script development / Problem Populating form @dob
Just try typing in Location Also you can use
|
|
Mar 28, 2008
|
Topic: Script development / possible dumb xpath question And you want the stringValue property of the XPathResult.STRING_TYPE. I noticed an example here:
|
|
Mar 28, 2008
|
Topic: Script development / Userscripts Code Block Fix @dob
@Aquilax
|
|
Mar 28, 2008
|
Topic: Script development / split I figured it out, I had it backwards...
Note that if the number was "01234567890", the first "0" would not match the expression, so it would skip to the next number. |
|
Mar 26, 2008
|
Topic: Script development / split I never really looked at that RegExp before, it's actually very efficient. I never realized that excluding a matched group would also exclude that group from being replaced. I think the RegExp in this case is faster.
Your function above creates 4 variables. It creates an iteration that evaluates the string length on each iteration (which you could avoid by creating yet another variable). Once I replaced a RegExp with a substring method and it was apparently slower, so I improved the RegExp, though I would also expect substring to be faster, it probably depends more on how efficient the statements are. In one case I just wanted to see if a file size was larger than 1M, so I did this
|
|
Mar 25, 2008
|
Topic: Script development / Noob Question You don't want to search the source of a page, either you search for elements or attributes and/or textContent.
|
|
Mar 25, 2008
|
Topic: Ideas and script requests / A MUST SEE!!!!! Heh, all you have to do is search for "UserScript". Must be too easy. |
|
Mar 25, 2008
|
Topic: Ideas and script requests / A unique hover pop up script Relentless, crafty Google searching turns up all kinds of useless info. |
|
Mar 25, 2008
|
Topic: Script development / Autofill but you'd be surprised at the lack of good Javascript tutorials there are on the internet. actually, surprised by the overwhelming number of bad tutorials. Of course, since IE isn't kept up-to-date why should anyone bother? |
|
Mar 25, 2008
|
Topic: Ideas and script requests / A unique hover pop up script Yes, I wouldn't have wasted so much time in my answer if I knew that ahead.
|
|
Mar 22, 2008
|
Topic: Script development / how to edit a table? Why add style attribute when you have a class name?
You can use min-height for a table, but you'll have to define a few other things, likely vertical-align: bottom; padding: auto; and maybe min-height for each cell, and there is no definition for "percentage" in table or cell heights. However you could use em which refers to line height (or width of "M", and ex is height of "x"), but is equal to the font size. I haven't messed with it much since it's totally inconsistent across browsers. |
|
Mar 22, 2008
|
Topic: Userscripts.org discussion / Encoding in comments Turn off Greasemonkey and look at this comment:
Why don't you just post this in the script description where you can edit it? |
|
Mar 22, 2008
|
Topic: Script development / how to edit a table? There is no "height" for tables: http://www.w3.org/TR/html401/struct/tables.html...
|
|
Mar 22, 2008
|
Topic: Script development / Problems installing Profanity Filter http://wiki.greasespot.net/Greasemonkey_Manual:... Read that part about "Edit the Script". They don't really explain how to edit someone else's script, but just ignore the part about creating a new script, you don't need to do that. However if you reinstall the script when it gets updated, you will lose any changes you made. You can save a copy and change the @name and maybe change the @namespace. Then just Use File -> Open to install the renamed script, disable the original. Now you have your version and the original, so you can use or edit either one. Also you could probably drag the script file into an empty browser window, then the Greasemonkey install dialog should pop up. Like I said, you should probably change the @name if you don't want script updates to erase what you changed, or you can save the updated script to disk and copy your changes then use File -> Open again. Which ever you prefer. |
|
Mar 22, 2008
|
Topic: Ideas and script requests / A unique hover pop up script I think I registered there. But anyway, if I had the time I could do this, it can certainly be done with XMLHttpRequest.
|
|
Mar 21, 2008
|
Topic: Userscripts.org discussion / Encoding in comments Hey! Now your code is correct in http://userscripts.org/forums/3/topics/1994#pos...
My code is correct either way. |
|
Mar 21, 2008
|
Topic: Userscripts.org discussion / Encoding in comments Also, I found if you use a block element or BR element just once, that it will mess everything up, you have to use blocks around everything, BR or P tags to add line breaks and preserve formatting. |
|
Mar 21, 2008
|
Topic: Userscripts.org discussion / Encoding in comments Oh I missunderstood what you are doing, I get it now. Just use formatting tags around the &
Also try to use spaces if you can like with if(i < j) so it doesn't look like a tag. |
|
Mar 21, 2008
|
|
|
Mar 21, 2008
|
Topic: Userscripts.org discussion / Encoding in comments Place it in |
|
Mar 21, 2008
|
Topic: Script development / Useful code snippets |
|
Mar 21, 2008
|
Topic: Ideas and script requests / SurfTheChannel Though I really hate low quality video, that site isn't too bad, nice that way they have everything organized. I was able to find Dexter with no trouble. Using LiveHTTPHeaders I was able to get the URL of the video and download it with my download manager, however I had to enter a file name to save the file as. And the video was 16/9 and the only flv player that would let me change the aspect ratio was Video Lan. With the above info a scriptwright should be able to figure out how to create a link, or there may already be one that works. Not really interested myself, more interested in HD. |
