SUGGESTIONS
|
|
USO told me that there's a max of 6000 characters in review, so moving this here
... perhaps a request or few if possible:
Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20100101 Firefox/5.0See also beginning forum discussion at http://userscripts.org/topics/25242 |
|
|
Marti wrote: Just took care of that. Use a backslash. Marti wrote: Done. |
|
|
sizzlemctwizzle wrote:Almost ;) I don't think it should show the escape character though.Marti wrote:Just took care of that. Use a backslash. Escape tests: [b]hello[/b] [b]hello[/b]
|
|
|
|
|
|
sizzlemctwizzle wrote:OOPS! Sorry put a pre at the beginning and a /code at the end LOL Nice job. |
|
|
Marti wrote:sizzlemctwizzle wrote:OOPS! Sorry put a pre at the beginning and a /code at the end LOL You almost gave me a heart attack Marti. Getting that to escape was so frustrating lol. Edit: The code one isn't working. Give me a sec. Edit again: Okay the escape escaping works in the code block now. Notice that when you edit your comment the backslash reappears. |
|
|
sizzlemctwizzle wrote:Hmmm Escaping escape tests (double backslashes) \[b]this should be bold[/b]\[b]this should be bold[/b] If you are using regular expressions to do this, you'll be an expert by the time I get done with requests *GRIN* LOL |
|
|
Marti wrote: Was wondering what you were doing there, but yes, if you put two backslashes you end up with one. Marti wrote: I am using regular expressions lol. What I have learned from all this is that I really dislike using only the replace function(back references are nasty). btw. I added your quoting guide to the about page. Marti wrote: I don't think this is too important since my script checks for an update every two day. If they disable automatic update checking it tells them the can re-active it from the "User Scripts Commands..." submenu. Marti wrote: I actually don't need to call page functions anymore so I can probably get rid of that error. |
|
|
Hmmm I must be on drugz here... I went to go strikeout and small one of the requests and with your script it "double spaces" my list entries. :\ ... lemme regather my thoughts and double check my html. |
|
|
Marti wrote: I'm converting newlines to <br /> tags now, so put your list on one line.
|
|
|
sizzlemctwizzle wrote:I'd rather not have that done... makes for one heck of a long line to edit and is against w3 standards. Time for that checkbox with an altered purpose now? ;) |
|
|
Marti wrote:sizzlemctwizzle wrote:I'd rather not have that done... makes for one heck of a long line to edit and is against w3 standards. Yeah. You're probably right. Give me some time though. I'm cleaning up the script(which could take awhile). Marti wrote: really? I had no clue. why? |
|
|
sizzlemctwizzle wrote:
<html>
<head></head>
<body>
This line
and this line< br />as compared to this line (had to put a space in the br tag btw... uso is doing something too)
</body>
</html>
Should always render as: Thislineand this line as compared to this line (had to put a space in the br tag btw... uso is doing something too) To give you some background... I edit my html outside of this Reply to Topic box... and I'd rather not have to run it through sed or tr to remove the \n characters. |
|
|
Sure a browser shouldn't render a newline as a visible newline, but we're talking about text entered in a textarea so its a little more complicated. Anyway, I'm going to only covert newlines to |
|
|
Well it is your script... however I'll need to make a mod locally to remove that feature because it slows down my replying when I don't get what I expect. My current method with current release is to disable your script, refresh the page and lose all capabilities... the alternative is to run my text through a filter first, then post it... if that is the case, I'd rather not use this script at all. So out of the 3 choices I have I'd rather alter the script, but that doesn't help anyone else. Catch my drift? |
|
|
I admit the way I'm doing it in the current version is terrible. I'm finishing up my next version. As long as the replacement doesn't happen inside tags then why would it matter? Could you please clarify? I don't see the disadvantage of this shortcut. If I have to I'll let you disable it from the GM commands menu. |
|
|
sizzlemctwizzle wrote:It already is happening outside of the whitelist. sizzlemctwizzle wrote: That's why these two blockquotes look different. If you think you can handle every possible logic case then go for it. I'm sure I'll comment if I find one that is missed ;) I've already removed the feature on my local copy too. Technically you could end up modifying the original post text. So far, with this one exception, every time I load up the edit anchor, it's exactly how I typed it. Just out of curiousity too... why did you choose to encode the image in Alt+X ?? Yours:
data:image/png,%89PNG%0D... Base64: (yours recoded and smaller)
data:image/png;base64,iVBORw0KG...(btw won't be keeping these strings in here for later reference) Sorta figured this one out already...innerHTML... gotta love it. |
|
|
Gave up. |
|
|
sizzlemctwizzle wrote:Refresh your page too ... you will see it still increased the list spacing. plus it added a trailing br tag when I reedited... reverting to this version for now with local edit. |
|
|
I know. I'm debugging right now. It's getting quite messy. Yeah it's probably better if you revert. I'll let you know if I get this figured out. |
|
|
sizzlemctwizzle wrote:;) Marti wrote:*whistles* ;) You are a very competent and adaptable coder... I rarely see this in other dev's... so don't ever knock your abilities. |
|
|
thanks for the vote of confidence. |
|
|
The code that I came up with worked, but would freeze the browser if the post contained too much text, so sadly, we'll just have to keep typing our var replacer3=function(str,open,inner,close) {return '<'+open+'>'+inner.replace(/\u0900/g, '\n')+'</'+close+'>';}
var textarea1.value=textarea1.value.replace(/\n/g, '\u0900');
tags=['p','code','pre','div','span','ul','ol','li'];
for (var i=0,len=tags.length; i < len; i++) {
textarea1.value = textarea1.value.replace(new RegExp("<("+tags[i]+"[^>]*)>((?:.|\s)*?)<\/("+tags[i]+")>", "gmi"), replacer3);
}
textarea1.value=textarea1.value.replace(/\u0900/g, '<br />');
|
|
|
sizzlemctwizzle wrote:hehe sounds good Current release test First round edit [b]this should be bold[/b]
Second round edit this should be bold
|
|
|
K... balls in your court... changed some wording around in request because I'm "stuck" too... as far as I can tell I'm SOL on 2nd edit and need to go fix it manually *GRIN* but maybe you have another idea... Looks like [url=http://example.com ]example[/url] is broken too... on in and out. If it comes down to escaping the escape versus a url... go with the url... and I'll just revoke my request :) ... going to move onto other thoughts. Thanks again for your time and efforts. |