inherit
173855
0
Apr 23, 2024 9:59:44 GMT -8
Texas
I check in every once in a while...
869
November 2011
petermaggio
|
Post by Texas on Nov 20, 2012 14:16:01 GMT -8
Okay so someone requested a plugin that reversed the censored words list but only for staff. So in other words, staff could see what word was censored instead of having to run to the censored word list to check. So I have this working...the only problem is it messes up the visual and bbc editors. Any idea what I should do to fix that?
function allSeeingEyes() { var str=document.getElementById("content").innerHTML; var n=str.replace("boring","fun"); document.getElementById("content").innerHTML=n; } $(document).ready(function() { allSeeingEyes(); });
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Nov 20, 2012 14:26:19 GMT -8
You are using innerHTML, which destroys the events.
|
|
inherit
173855
0
Apr 23, 2024 9:59:44 GMT -8
Texas
I check in every once in a while...
869
November 2011
petermaggio
|
Post by Texas on Nov 20, 2012 14:32:36 GMT -8
Is there an alternate way of doing this?
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Nov 20, 2012 14:39:08 GMT -8
I wouldn't bother with HTML replacement, do a text replacement only. Maybe use text range / tree walker.
|
|
inherit
173855
0
Apr 23, 2024 9:59:44 GMT -8
Texas
I check in every once in a while...
869
November 2011
petermaggio
|
Post by Texas on Nov 20, 2012 14:48:13 GMT -8
It would be really helpful if you could show me how to do that cause I don't know how.
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Nov 20, 2012 14:57:25 GMT -8
|
|
inherit
173855
0
Apr 23, 2024 9:59:44 GMT -8
Texas
I check in every once in a while...
869
November 2011
petermaggio
|
Post by Texas on Nov 20, 2012 15:36:22 GMT -8
I think I found a solution.
If I just have the code apply when I am viewing a thread will it still mess stuff up?
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Nov 20, 2012 15:48:28 GMT -8
|
|