Userscripts Comments Fix

By sizzlemctwizzle Last update Nov 14, 2011 — Installed 11,409 times.

SUGGESTIONS

in
Subscribe to SUGGESTIONS 349 posts, 14 voices



sizzlemctwizzle Script's Author
FirefoxMacintosh

w35l3y wrote:
the condition GM_getValue('updated_24464', 0) == 0 is incorrect because this is TRUE only at the very first execution of the script

It took me awhile to realize what else you changed since you rearranged my code but you are correct.
Edit: Done updating the updater :)
w35l3y wrote:
PS: I'm considering the updater http://sizzlemctwizzle.com/updater.php?id=24464

Cool. See here for a little documentation.
v2.0.6 released. Spam reporting is fixed.

 
Marti Scriptwright
FirefoxX11

sizzlemctwizzle wrote:
v2.0.6 released. Spam reporting is fixed.
OOOH! Gracias! Muy bueno! Very GOOD! Awesome! Killer! :)


Testing zone (a.k.a the war zone)
2.0.6
(moved to here)

 
sizzlemctwizzle Script's Author
FirefoxMacintosh

Marti wrote:
  • NEW Work with send message even if it's just making the text box bigger... SOOPER DOOPER PLEASE :)

I'll start by making the box bigger and throwing in some key shortcuts.

 
Marti Scriptwright
FirefoxX11

sizzlemctwizzle wrote:
I'll start by making the box bigger...
Scratch this... had GIJoe do the size increase... would still like functionality though somewhere down the line! :) Thanks

 
Mr. Derpison Scriptwright
FirefoxWindows

Mabey highlight your own post? :)

 
Marti Scriptwright
FirefoxX11

New request


Test block

visible some random text here
invisible
visibleinvisible

 
sizzlemctwizzle Script's Author
FirefoxWindows

Marti wrote:
NEW In order to support uso - Anchor Bookmarks in code blocks I need the pre and code tags to accept null values... e.g. [url=][/url] TIAMozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.1.8) Gecko/20100202 Firefox/3.5.8See also beginning forum discussion at http://userscripts.org/topics/25242

Okay, my latest change should enable that. I just changed a + to * in the regexp.

 
Mr. Derpison Scriptwright
FirefoxWindows

Thanks! :)

 
Marti Scriptwright
FirefoxX11

sizzlemctwizzle wrote:
Okay, my latest change should enable that. I just changed a + to * in the regexp.
Ahh if only it were that easy...

Okay... your latest change allowed string null on href... which is probably an added benefit :)

If a links href is string null then it creates a link (visible assuming there is textContent) and points it to the current page like this...

however that's not how uso- Anchor Bookmarks works.

What is needed is some ability to make a null (no attributes) anchor tag maybe like this (now that I think about it this is probably more syntactically correct)

[url][/url]                          <-- invisible bookmark
[url]visible bookmark[/url]
in code and pre tags which will be translated in your script to

<a></a>
<a>visible bookmark</a>

Thanks for the quick try... I'll be eager to see how you handle this... your code looks way different then the last time I took a gander at it so I'll try to figure it out with you but no promises. ;)

 
Marti Scriptwright
FirefoxX11

This additional line escapes it properly I think

.replace(/\[url\]((?:.|\s)*?)\[\/url\]/gmi, '<a>$1</a>');

unescaping seems to work with this

.replace(/<a>((?:.|\s)*?)<\/a>/gmi, '[url]$1[/url]')

What does the test function do?

Btw the above lines do work and my script is working but something in your scripts is hiding my images in pre tags... If I disable Comments Fix, then they show up(or if I double-click and use your beautifier) and other browsers show them because Comments Fix isn't installed there. :\ Are you still beautifying even when you know that the beautifier routine causes issues? :P These mods in tandem with other actual urls are favorable.

Note to self... don't edit this post with script enabled.

 
sizzlemctwizzle Script's Author
FirefoxMacintosh

Marti wrote:
What is needed is some ability to make a null (no attributes) anchor tag maybe like this

Okay the latest update should work. I haven't tried it with your script, but the now you can have a no href A element.
Marti wrote:
Are you still beautifying even when you know that the beautifier routine causes issues?

I didn't think my code did that but I'll have to look more deeply at my code to verify.
Marti wrote:
What does the test function do?
sizzlemctwizzle wrote:
The most important change in this version is some checking I preform when escaping/unescaping PRE & CODE blocks. I've always been irritated when I'm posting a fairly large chunk of code and the script freezes my browser. This happens because the BBCode replacement is fairly memory intensive, but the replacement shouldn't occur if I'm not using BBCode. So I've added some regexp that checks for the existence of BBCode, before it even goes into replacing it. The result is that I can post large chuncks of code without freezing my browser.

 
Marti Scriptwright
FirefoxX11

Partially works... that position isn't where I put the code though but I'm not used to your code anymore LOL... I had to do it outside of the test function conditionals.


Also now my icons are showing up GRRR hate gremlins... must be the order of script execution in GM... I still have some styling to change to make this more compliant with other scripts but it is definitely script order.


Test block (this should be identical to above test block... FAILED)
visible some random text here
[url][/url]invisible
visible[url][/url]invisible

 
sizzlemctwizzle Script's Author
FirefoxMacintosh

Marti wrote:
Partially works...

Okay I don't what problems you're having but this is my test:
link
no href
invisible

This is what I'm using to produce above:
[url=http://www.google.com/]link[/url]
[url]no href[/url]
[url][/url]invisible
invisible

 
Marti Scriptwright
FirefoxX11

This is going to take a while...

So I've disabled 100% of my scripts except yours and mine... If I have Anchor Bookmarks first the icons in the pre tag block in this post show up... If I reverse the order... they disappear in the pre block. btw I reverted back to Firefox 3.5.8 since 3.6.0 is still flakey.

 
Marti Scriptwright
FirefoxX11

[url][/url] This is an invisible bookmark and is normallly how bookmarks are done... visible ones are less likely to happen.

[url][/url]
[url][/url]

Test fails.



[url]visible bookmark[/url]
visible bookmark
visible bookmark

Test passes

 
Marti Scriptwright
FirefoxX11

This is how I got it to work in the above post... I still haven't tried nested bookmarks but working on this... when you placed your change after the test() this is where I ran into trouble as well and had to move it outside of that. That's why I asked you what the test routine is.

 
sizzlemctwizzle Script's Author
FirefoxMacintosh

Okay. I've discovered the problem. I didn't make the change from earlier today locally(since I wasn't on my computer at the time) but my latest update now works for invisible anchors. See this example.

 
Marti Scriptwright
FirefoxX11

okay so some typing
okay so some more typing

 
sizzlemctwizzle Script's Author
FirefoxMacintosh

Marti wrote:
Still failing here

You were right about the test() code. It was contributing to the failure, but I uploaded another version yet again that should fix the issue.

 
Marti Scriptwright
FirefoxX11
sizzlemctwizzle wrote: that should fix the issue
Seems better but I'm not getting anything with just [url][/url] in both code and pre tag blocks... I briefly see a flashing < a > (note the spaces)... lemme do some more checking on my end... at least firebug reports the DOM as being correct although it tends to terminate unterminated tags... I've been working on this for 8 hours LOL... just ate though that should help the body and brain cells a bit.

goto pre tag
goto code tag
 
sizzlemctwizzle Script's Author
FirefoxMacintosh

Marti wrote:
I'm not getting anything with just [url][/url]

I am:

 
Marti Scriptwright
FirefoxX11

sizzlemctwizzle wrote:
Marti wrote:
I'm not getting anything with just [url][/url]
LOL ignore this... I'm really tired from reverse engineering your script logic... it appears to work :) Thank you VERY MUCH... I'll give both of us a break and worry about nested ones later. LOL

 
sizzlemctwizzle Script's Author
FirefoxMacintosh

Marti wrote:
I'm really tired from reverse engineering your script logic

yeah it'll do that to you lol. the replacement logic is very fragile(replacement order is very important). gives me a headache if I spend too much time on it and I wrote the thing lol.
Marti wrote:
Thank you VERY MUCH

No problem.
Marti wrote:
worry about nested ones later. LOL

that'll be fun haha.

 
Marti Scriptwright
FirefoxX11

sizzlemctwizzle wrote:
gives me a headache if I spend too much time on it and I wrote the thing lol.
Well the thought of 'It is code only a "Mother" could love' came across my mind a few times ;) *GRIN*


Testing zone (a.k.a the war zone)
2.0.9
(moved to here)

 
Mr. Derpison Scriptwright
FirefoxWindows

italicunderlinebold doesnt fail! :D

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel