Sign in or 

|
I.Join |
wettaint, IMDB, links and Greasemonkey
Apr 6 2011, 9:20 PM EDT
| Post edited: Apr 9 2011, 9:28 AM EDT
Don't use word processors (Word, Wordpad, Writer) to modify the script!Use Windows Notepad, Notepad++, another plain-text editor or an IDE! So, as many of you have surely noted, we're not able to correctly post IMDB links in wettaint. The system tries to avoid us to do by modifying them: it replaces the /t itle/ part with /t&sh y;itle/ (without space), which is correctly shown in the browser (cause rendering of the code), but can't be used as a link. Modifying the Greasemonkey script we use for the wikis (you use it, don't you!?), I've been able to correctly show the links (including existing ones). Since the error is added while generating the page on the server, and not while posting (as is, instead, for the HTML), I've not been able to modify the script to generate a working page for everyone: it only replaces the wrong code while rendering the page, so only who use the modified script will be able to use the links. To use it, open your existing script (right click on the greasemonkey icon in the low-right of firefox > user scripts > edit the UnTaint script), go to the end, add some empty rows and paste this: ------------------------- Updated: See posts #8 and 9 - Thank to Charley for help! ------------------------- Do you find this valuable? |
|
t5000 |
1. RE: wettaint, IMDB, links and Greasemonkey
Apr 7 2011, 3:47 AM EDT
TSCC PAGE AT IMDBOK not sure what you are talking about but will post a imdb link. Do you find this valuable? |
|
t5000 |
2. RE: wettaint, IMDB, links and Greasemonkey
Apr 7 2011, 3:48 AM EDT
| Post edited: Apr 7 2011, 3:51 AM EDT
ok worked fine without your script, so why would you write a script??edit: let me add that the new 9.0 version of grease monkey is no good, you need the previous 8.xx version and FF 3.5 or 6. I have that now and turned updates off. Do you find this valuable? |
|
R.Daneel_Olivaw |
3. RE: wettaint, IMDB, links and Greasemonkey
Apr 7 2011, 6:38 AM EDT
"TSCC PAGE AT IMDBI am using Firefox/3.6.16 with Greasemonkey 1.6 and your link did not work for me. The URL that it sent me to is this: http://www.imdb.com/t%C2%ADitle/tt0851851/ If I manually change it in the address bar from t%C2%ADitle to title, I go to the TSCC page. Do you find this valuable? |
|
I.Join |
4. RE: wettaint, IMDB, links and Greasemonkey
Apr 7 2011, 10:27 PM EDT
| Post edited: Apr 7 2011, 10:43 PM EDT
OK, I talked too quickly: by now, the script only works on plain-text IMDB urls... it's not correcting links (like the one you posted). I'll fix it now (that's a personal challenge now!)Anyway, it seems that wettaint always modifies the "title" word adding chr(173) http://www.imdb.com/title/tt0851851/ Do you find this valuable? |
|
Charley_Dixon |
5. RE: wettaint, IMDB, links and Greasemonkey
Apr 8 2011, 12:29 AM EDT
| Post edited: Apr 8 2011, 12:53 AM EDT
"Since the error is added while generating the page on the server, and not while posting (as is, instead, for the HTML)"No, it's script error. Find a line input = input.replace(new RegExp(touncensor.join('|'), 'gi'), function(str) { try to replace it with something like input = input.replace(new RegExp('\b('+touncensor.join('|')+')\b', 'gi'), function(str) { and then try to post IMDB link. If you look at the preceding line you will see why this happens. It's kind of funny side effect :) Edit: just tested it and it worked for me: http://www.imdb.com/title/tt0851851/. Do you find this valuable? |
|
I.Join |
6. RE: wettaint, IMDB, links and Greasemonkey
Apr 8 2011, 7:43 AM EDT
| Post edited: Apr 8 2011, 8:22 AM EDT
A script error... so, if I post http://www.imdb.com/title/tt0851851/ without Greasemonkey it should work... Do you find this valuable? |
|
I.Join |
7. RE: wettaint, IMDB, links and Greasemonkey
Apr 8 2011, 8:05 AM EDT
| Post edited: Apr 8 2011, 2:42 PM EDT
OK, thank you Charley, I found the cause of the problem: in the line before the one you modified there's also "t i t". If you remove it by the list, imdb links/urls are no longer modified... each word in that list is modified to avoid the censor to delete it...but not only whole words (that's the main problem!)Now I try your mod to see if the uncensor works: fuck shit aaafuck shitaaa title subtitle *** http://www.imdb.com/title/tt0851851/ Do you find this valuable? |
|
I.Join |
8. RE: wettaint, IMDB, links and Greasemonkey
Apr 8 2011, 3:02 PM EDT
| Post edited: Apr 8 2011, 3:09 PM EDT
OK Charley, if I apply the change you suggested, it works... simply because the uncencor no longer works :PAnyway, expecting that not everyone will update their scripts, I continued in the way I started, so the script now corrects both text and links, also locally removing the uncensor character (so you can copy a text and paste to a text editor / word processor without strange effects) The new script to add at the end is var UnUncensorText = new RegExp(String.fromCharCode(173),'g'); // use ",'gi'" instead ",'g'" for case insensitive (not needed) var AllTextAreas = document.getElementsByTagName('span'); for(i = 0; i < AllTextAreas.length; i++){ //we only care about parts with the class name "threadText" if(AllTextAreas[i].className == 'threadText'){ AllTextAreas[i].innerHTML = AllTextAreas[i].innerHTML.replace(UnUncensorText,''); } } var UnUncensorLink = new RegExp('%C2%AD','gi'); // this one IS case insensitive var AllLinks = document.getElementsByTagName('a'); for(i = 0; i < AllLinks.length; i++){ //we only care about parts with the class name "external" if(AllLinks[i].className == 'external'){ AllLinks[i].href = AllLinks[i].href.replace(UnUncensorLink,''); // AllLinks[i].innerHTML = AllLinks[i].innerHTML + ' (links to: ' + AllLinks[i].href + ')' // This optional line adds a "links to" description on the right of an user-added link } } Note the last code: many will not want it, simply uncomment it if you do. Do you find this valuable? |
|
I.Join |
9. RE: wettaint, IMDB, links and Greasemonkey
Apr 8 2011, 3:16 PM EDT
To post IMDB links/urls that can be used by everyone, simply remove tit by the uncensor list in the line:find the line saying touncensor = ['asshole', 'bitch', 'cunt', 'fuck', 'shit', 'whore', 'pussy', 'tit']; and modify it to (don't copy!) touncensor = ['asshole', 'bitch', 'cunt', 'fuck', 'shit', 'whore', 'pussy']; You'll no longer be able to write tit on the forum, but everyone will be able to use your IMDB links and urls. NOTE: You can't simply copy this post, since what you read here is already modified by the uncensor! Find the line and remove , 'tit', including the comma and the two '. Do you find this valuable? |
|
t5000 |
10. RE: wettaint, IMDB, links and Greasemonkey
Apr 9 2011, 4:10 AM EDT
| Post edited: Apr 9 2011, 4:18 AM EDT
test tscc imdb linkstill adds the to the link, I guess you can then edit your post and change the text as rdo suggested, so I am doing that and see if it works now. also I edited the script in word pad and removed the 'tit', then saved it with a .js extention , but had problems adding that to GM I think maybe it needs to be uploaded as a webpage as the original was?? then you go to that webpage and get the option to add it. edit 2........ link still does not go to right page. Do you find this valuable? |
|
I.Join |
11. RE: wettaint, IMDB, links and Greasemonkey
Apr 9 2011, 8:33 AM EDT
| Post edited: Apr 9 2011, 10:00 AM EDT
"test tscc imdb linkYou can't edit the script with wordpad, because it's a rich text format editor, and it will add many parts (formating) that you don't see. You can use Windows Notepad (Notepad.exe), which is a simple text editor (both ASCII and Unicode): re-download the original script (you've damaged the one you have), open it with notepad, modify and save it and you'll be able to install it. In Greasemonkey you've the option to set the editor and open the script directly by Firefox (the editor you selected will be run). If you want a better text editor, good for programming, use the free Notepad++ or the commercial Ultraedit (I used this, modified to highlight names and have different colors for comments or descriptions while writing simple text, to write my fanfic: that's what a programming-oriented text editor lets you do!) EDIT Since I'm using the modified script, I'm able to open your links. If I disable Greasemonkey (or use another browser) I'm not able to open them, so I repeat: the list mod (tit) lets everyone to use your IMDB links/urls, the added code lets you open everyone's links/urls (every link/url modified by the UnCensor!). Do you find this valuable? |
|
tscc1000 |
12. RE: wettaint, IMDB, links and Greasemonkey
Apr 9 2011, 1:44 PM EDT
I'm using FF 3.6.16, Greasemonkey 0.9.1 and Untaint-Minimal 1.2. Still working fine for me.// @include http://tsccwiki.wetpaint.com/thread/* // @include http://thecape.wetpaint.com/thread/* // @include http://www.sarahconnorfans.com/thread/* // @include http://nikita2010.wetpaint.com/thread/* // @include http://hawaiifive-0.wetpaint.com/thread/* Do you find this valuable? |
|
I.Join |
13. RE: wettaint, IMDB, links and Greasemonkey
Apr 9 2011, 2:58 PM EDT
"I'm using FF 3.6.16, Greasemonkey 0.9.1 and Untaint-Minimal 1.2. Still working fine for me.If it is "minimal" (so, I figure, it doesn't have the uncensor function) you can post IMDB links and urls... but try to open the link in post #1! The 2 pieces of code are to remove the UnCensorer character, letting you open links made by who uses the 1.5b. Do you find this valuable? |
|
tscc1000 |
14. RE: wettaint, IMDB, links and Greasemonkey
Apr 9 2011, 5:49 PM EDT
| Post edited: Apr 9 2011, 5:55 PM EDT
"If it is "minimal" (so, I figure, it doesn't have the uncensor function) you can post IMDB links and urls... but try to open the link in post #1!Terminator: The Sarah Connor Chronicles at IMDb Edit: Posting and opening the link still works perfectly for me. BTW, the link in post#1 is wrong, "http://www.imdb.com/t-itle/tt0851851/", there shouldn't be a "-"! Do you find this valuable? |
|
I.Join |
15. RE: wettaint, IMDB, links and Greasemonkey
Apr 9 2011, 6:12 PM EDT
"Terminator: The Sarah Connor Chronicles at IMDbThat's the point! Obviously the link is wrong: the version 1.5b of the script replaces it in the word title because the uncensor function in it recognizes a known word (the first 3 letters). Now, since wetpaint doesn't allow you to write that word (that now I can't write, since I modified the script), the uncensor function "corrects" it adding a character that isn't normally shown. The problem is that, if that character is added to a link (even a n anchor or a plain text url) the link becomes wrong a doesn't work. I added the two functions right to allow everyone to remove the unneeded character while rendering the page, in both urls and links (the functions are different). If you don't have the above functions on your script you'll not be able to use some links you can find in some posts. Since you also don't have the uncensor function in your script, your posts can be opened by everyone. Try this new script, if you want, and you'll be able to use links damaged by the censor too. Let me know if you have any problem. Disable (but don't uninstall) your existing script to use the new one. All the script working began by the impossibility to use IMDB links, then Charley made me see that the problem isn't wettaint, but the script and its uncensor... Do you find this valuable? |