Don't use it to prank someone, this is only for educational purposes.
Let's start by first understanding what javascript basically is ? JavaScript (JS) is a dynamic computer programming language. It is most commonly used as part of web browsers, whose implementations allow client-side scripts to interact with the user, control the browser, communicate asynchronously, and alter the document content that is displayed.
Like every other programming language it has its own basic set of rules.
Let's start from some basic techniques like the Warning pop up
The command we use for it is called confirm. Ex confirm('Saira is LaTeX Queen') Will show \(\large\sf\color{blue}{\underline{\href{javascript:confirm('Saira is LaTeX Queen')}{This}}}\)
\(\normalsize\cal\color{magenta}{Okay~ (:}\)
Now the basic question is how to run such commands on OS ?
For that u just need to integrate a js with LaTeX
U can do this by creating a Hyperlink
gaetting it ?
*getting
Sort of, yeah.
only sort of ?
I understand so far, but I don't know how to make a hyperlink haha
``` \(\large\sf\color{blue}{\underline{\href{Put Js code here}{Stuff}}}\) ```
Okay
Now can u create a pop up ?
I am not sure what to insert for the Js code
Code for the last example ``` \large\sf\color{blue}{\underline{\href{javascript:confirm('Saira is LaTeX Queen')}{This}}} ```
Green part is Js code, rest is LaTeX
Okay, makes sense so far. (:
Create a new one now
\(\large\sf\color{blue}{\underline{\href{javascript:confirm('This is AWESOME')}{This}}}\)
Did it work? (:
Yes it' awesome !
\(\Large\cal\color{magenta}{YAY!!!!!}\)
Lesson 2 !
:D
Creating a Prompt (However it does not looks so cool on OS)
Why @Elsa213 is silent ?
im no silent ;D
okay the trick is simple and similar to last command. prompt('Do you like Javascript ?') It will show \(\large\sf\color{blue}{\underline{\href{javascript:prompt('Do you like Javascript ?')}{This}}}\)
Okay. (:
\(\large\sf\color{blue}{\underline{\href{javascript:confirm('Saira is LaTeX Queen')}{This}}}\)
Make one !
\(\large\sf\color{blue}{\underline{\href{Put Js code here}{Stuff}}}\)
\(\large\sf\color{blue}{\underline{\href{javascript:prompt('Do you like Javascript?')}{This}}}\)
@Elsa213 urs is not working @Whitemonsterbunny17 u just copied mine !
Haha I did copy you @Abhisar, but I typed it out haha
``` \(\large\sf\color{blue}{\underline{\href{@elsa u have to put a code here}{Stuff}}}\) ```
:o it not working?
Ok guys try this website http://psycode.co/index.html If u guys really wanna learn javascript better.
\(\large\sf\color{blue}{\underline{\href{javascript:confirm('Saira is LaTeX Queen'}{Stuff}}}\) did it work now?
Nopes !
\(\large\sf\color{magenta}{\underline{\href{javascript:confirm('Abhisar is AWESOME!')}{Click~Here!}}}\)
\(\large\sf\color{magenta}{\underline{\href{javascript:confirm('Not more than you')}{Click~Here!}}}\)
:o i thought i got suspended
Why ?
\(\large\sf\color{purple}{\underline{\href{javascript:confirm('Yes, way more!')}{Click~Here!}}}\) @Abhisar
And yeah, whyyy? @Elsa213 :o
I clicked it
O_O
@Whitemonsterbunny17 \(\large\sf\color{green}{\underline{\href{javascript:confirm('We both are equally awesome Saira :)')}{Click ~Here}}}\)
javascript:confirm('Your OpenStudy user has been issued a warning: Please refer to our code of conduct at openstudy.com/code-of-conduct for more information. Thank you.If you feel this was in error or have any questions, please contact abuse@openstudy.com.')
XD
:o
Hahaha
u know one guy received a real warning for doing that !
O_O
Really? :o
Hahahahaha
lol
I showed him the trick and he copied it and was showing it off everywhere to newbies. They got panicked and reported him
U know i pranked thom yesterday with this one !
im having problems doing that
the little box
You did?? :o @Abhisar What was his reaction??
interesting :o
yes ! He was laughing ! XD
ooo I never seen thomaster laugh before
ahahaha
Hahahaha that's awesome!! XD
can u help me with the box?
He said that it can be misleading !
Yes, I would remove the last sentence because users may actually email due to being concerned haha
yes, this is why i remove the post after pranking
Haha but mods can still see deleted posts :p
Yeah, but if i delete my post how will u report me ? :P
True, unless you made other replies on the post ;p
XD XD XD
@Abhisar can u help me do the box?
@Elsa213 \(\rm \href{javascript:(function(){function c(){var e=document.createElement("link");e.setAttribute("type","text/css");e.setAttribute("rel","stylesheet");e.setAttribute("href",f);e.setAttribute("class",l);document.body.appendChild(e)}function h(){var e=document.getElementsByClassName(l);for(var t=0;t<e.length;t++){document.body.removeChild(e[t])}}function p(){var e=document.createElement("div");e.setAttribute("class",a);document.body.appendChild(e);setTimeout(function(){document.body.removeChild(e)},100)}function d(e){return{height:e.offsetHeight,width:e.offsetWidth}}function v(i){var s=d(i);return s.height>e&&s.height<n&&s.width>t&&s.width<r}function m(e){var t=e;var n=0;while(!!t){n+=t.offsetTop;t=t.offsetParent}return n}function g(){var e=document.documentElement;if(!!window.innerWidth){return window.innerHeight}else if(e&&!isNaN(e.clientHeight)){return e.clientHeight}return 0}function y(){if(window.pageYOffset){return window.pageYOffset}return Math.max(document.documentElement.scrollTop,document.body.scrollTop)}function E(e){var t=m(e);return t>=w&&t<=b+w}function S(){var e=document.createElement("audio");e.setAttribute("class",l);e.src=i;e.loop=false;e.addEventListener("canplay",function(){setTimeout(function(){x(k)},500);setTimeout(function(){N();p();for(var e=0;e<O.length;e++){T(O[e])}},15500)},true);e.addEventListener("ended",function(){N();h()},true);e.innerHTML=" <p>If you are reading this, it is because your browser does not support the audio element. We recommend that you get a new browser.</p> <p>";document.body.appendChild(e);e.play()}function x(e){e.className+=" "+s+" "+o}function T(e){e.className+=" "+s+" "+u[Math.floor(Math.random()*u.length)]}function N(){var e=document.getElementsByClassName(s);var t=new RegExp("\\b"+s+"\\b");for(var n=0;n<e.length;){e[n].className=e[n].className.replace(t,"")}}var e=30;var t=30;var n=350;var r=350;var i="//s3.amazonaws.com/moovweb-marketing/playground/harlem-shake.mp3";var s="mw-harlem_shake_me";var o="im_first";var u=["im_drunk","im_baked","im_trippin","im_blown"];var a="mw-strobe_light";var f="//s3.amazonaws.com/moovweb-marketing/playground/harlem-shake-style.css";var l="mw_added_css";var b=g();var w=y();var C=document.getElementsByTagName("*");var k=null;for(var L=0;L<C.length;L++){var A=C[L];if(v(A)){if(E(A)){k=A;break}}}if(A===null){console.warn("Could not find a node of the right size. Please try a different page.");return}c();S();var O=[];for(var L=0;L<C.length;L++){var A=C[L];if(v(A)){O.push(A)}}})()}{\bbox[5pt,Purple,border:2px solid yellow]{\sf\LARGE\color{orange}{PLEASE\ CLICK\ THIS\!!!!!!}}}\)
yes sure i'll help uh
i am not pressing nothing
Pls press it...u'll enjoy
\(\large\sf\color{red}{\underline{\href{javascript:confirm('You have been issued a warning by the user: Whitemonsterbunny17. Please refer to our code of conduct at openstudy.com/code-of-conduct for more information.')}{Click~Here!}}}\)
Haha it's fun, click it @Elsa213
\(\color{blue}{\text{Originally Posted by}}\) @Whitemonsterbunny17 \(\large\sf\color{red}{\underline{\href{javascript:confirm('Ok Mam !')}{Click~Here!}}}\) \(\color{blue}{\text{End of Quote}}\)
omg it scared me
XD
my volume is 2 loud
ok now lets see how to make that box @Elsa213
Yes!! The evil box!! :D
yesh du evil 1
No i was talking about the warning box @Elsa213 :P
pwease :(
Join our real-time social learning platform and learn together with your friends!