[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

for(i=0;i<(posts=document.getElemen tsByTagName('blockquote')).length;i

The stories and information posted here are artistic works of fiction and falsehood.
Only a fool would take anything posted here as fact.

Thread replies: 43
Thread images: 3

File: 1422825100742.png (25KB, 396x160px) Image search: [Google]
1422825100742.png
25KB, 396x160px
for(i=0;i<(posts=document.getElementsByTagName('blockquote')).length;i++){posts[i].innerHTML=posts[i].innerHTML.replace(/(.*?\&lt\;)(\<br\/?\>|$)/g,'<span style="color:orange;">$1</span>$2');}

You first have to enable orange text<
>>
File: Orange.png (57KB, 452x507px) Image search: [Google]
Orange.png
57KB, 452x507px
>>
What is moot? Haha sorry I'm new here, just came from reddit (:
>>
>>595917958
:^) (^:
:v) (v:
>>
I dont believe it<
>>
>is this how greentext
>>
>>595918295
Up vote for you kind sir :-)
>>
>>595918686
captain?
>>
&lt;Emmmm
>>
for(i=0;i<(posts=document.getElementsByTagName('blockquote')).length;i++){posts[i].innerHTML=posts[i].innerHTML.replace(/(\<br\/?\>)/g,'$1\n').replace(/(.*?\&lt\;)(\<br\/?\>|$)/g,'<span style="color:orange;">$1</span>$2');}

This would be a better code…

I think I’ll work on a User Script for GreaseMonkey to make orange text work everywhere.
>>
>what if i do this<
or< this

what about this<<
>>
File: Test.png (8KB, 394x126px) Image search: [Google]
Test.png
8KB, 394x126px
>>595919724
class quote (used for greentexting) overrides orange text.
Second line gets ignored as expected.
And third line becomes orange.
>>
>>595920054
really?<
>>
>>595920957
no<
>>
>>595919204
Do you mind if I publish the script?
>>
>>595919204
I have also found another issue. If you click the update button at the bottom and someone tries to orange text it shows it without the orange.
>>
I don't know what's going on here, but I really want to.
>>
>>595921978
we are orange texting<
>>
>>595921550
>>595921780
I know that it doesn’t update yet. See >>595919204: I’m working on a UserScript and I’ll be experimenting with MutationObserver in order for the updating thing to work properly. You can work on it, too, and publish it if you wish. I won’t be a copyright nazi or anything with that.
>>
>>595922064
I see.
>>
>>595922147
I don't really know much about coding so I'm not gonna publish it. Make a thread about this on >>/s4s/ and keep it updated.
>>
>>595922385
>>>/s4s/
>>
How do I blue text?
>>
>>595922477
Fuck, I could as well implement BB Code on 4chan via Grease Monkey…
>>
>>595922595
Use ^ to bluetext
>>
How I do orangine now?<
>>
Purple text.
Red text.
White text.
Black text.
Beige text.
>>
>>595922477blutext
>>
>>595923400
>>>/b/luetext
>>
>>595923534
this nigga gets it
>>
>>595917159
tfw<
>>
The fuckers that think they can orangetext lol..
>>
if we can orange and greentext, how does one purpletext?
>>
>>595924234
Delete System32.
>>
why make everything piss yellow or some terrible color for a week
>>
>>595924500
gr8 b8 m8, i r8 it an 8/8, pls no h8 do appreci8, i dont meant to berr8 when i say i hope you will make more b8 for me to r8
>>
<span class="redtext">moot's final 4chan Q&amp;A has been posted <a href="//youtu.be/XYUKJBZuUig?t=41s" target="_blank" title="moot's final 4chan Q&amp;A on YouTube">here</a>.<span>
>>
>>595925279
<span class="redtxt">moot's final 4chan Q&amp;A has been posted <a href="//youtu.be/XYUKJBZuUig?t=41s" target="_blank" title="moot's final 4chan Q&amp;A on YouTube">here</a>.</span>
>>
>>595925210
>"bait"
>when its actually just an anon trying to be funny
>>
>>595922147
Any luck on the update thing?
>>
>>595926118
Working user script (just finished):

/*
Orange text on 4chan:
This line becomes orange.<
This line doesn’t.
*/

function doOrange(){
for(i=0;i<(pst=document.getElementsByTagName('blockquote')).length;i++){ // For every post
pst[i].innerHTML=pst[i].innerHTML
.replace(/(\<br\/?\>)/g,'$1\n')
.replace(/(.*?\&lt\;)(\<br\/?\>|$)/g,'<span style="color:orange;">$1</span>$2'); // Apply orange color to every line ending with "<"
}
}

window.addEventListener('DOMContentLoaded',function(){ // Initialize script upon page load
new MutationObserver(doOrange) // Set up mutation observer to observe updates in the thread
.observe(document.getElementsByClassName('thread')[0], // Observing the thread, obviuously
{childList:true}); // And the posts and all that within it
doOrange(); // Make text orange not only upon updates but also upon page load.
});
>>
>>595926271
You should make a thread about it on a smaller board like [s4s]<
>>
>>595926271
It’s actually fucking working!

You can also type

function doOrange(){for(i=0;i<(pst=document.getElementsByTagName('blockquote')).length;i++){pst[i].innerHTML=pst[i].innerHTML.replace(/(\<br\/?\>)/g,'$1\n').replace(/(.*?\&lt\;)(\<br\/?\>|$)/g,'<span style="color:orange;">$1</span>$2');}}new MutationObserver(doOrange).observe(document.getElementsByClassName('thread')[0],{childList:true});doOrange();});

in your browser’s Developer Tools Console.
Orange<
Thread posts: 43
Thread images: 3


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.