Closed GoogleCodeExporter closed 8 years ago
Update about '2.' I found the fix myself on the web instead of ('',' '), I used (//gi, ' ') that took care of every single underscore in all the token answers.
Thanks netherless^^ keep up the good work
Original comment by
ser...@hotmail.com
on 25 Mar 2013 at 4:25
First, it seems like Javascript currently has a major flaw with the replacing of forbidden characters. I'll release an alpha version tonight or tomorrow (UTC+9) to fix this as well as danbooru 2.0.
/_/gi
can be replaced by /_/g
(the i stands for "case insensitive", but an underscore doesn't has case).
It doesn't really changes anything, but well. ^^Original comment by
bio.nus@hotmail.fr
on 26 Mar 2013 at 2:20
- Changed state: Started
after a hiatus, I finally tried again the Javascript naming features and got a few problems.
javascript:search_1[0] + '\\' + search_1.replace('_', ' ') + '\\[' + artist.replace('_', ' ') + '] ' + website + ' ' + id + ' (' + copyright.replace('_', ' ') + ' (' + character.replace('_', ' ') + ')).' + ext
with this line, I try to remove every single '_'(underscore) with 'space'. But, up to now, grabber only replace the very first underscore for each token. here is the kind of result I get for Copyright and Character tokens :dragon quest+dragon_quest_iii (mage (dq3)+priest_(dq3)) original+yuusha to_maou (nise maou_kanizeru)
As you can see, only the first underscore for each token is removed.Is there a problem in my javascript code? how could I fix that?
Thanks keep up the good work!