A post for @Abhisar to teach me and @sleepyjess Javascript! xD And maybe even @sammixboo @confluxepic @Jhannybean @Nnesha
Come here my minions! @Abhisar @sleepyjess
^_^
Ok, so to start with. Do you guys know anything about HTML?
yes
\(\bbox[15pt, blue,border:10px solid red]{\href{http:///goo.gl/xRKkFL}{\color{white}{\LARGE \frak Please~Click~here~to~play~the~game}}}\\ \rm Made~by~@Abhisar\)
:P Had to do it!
You know the basic structure of HTML? <!DOCTYPE html> <html> <head>This is the header</head> <body> </body> </html>
I don't know too much, but I will let Abhisar take over :)
You can all try messing with those commands here http://www.w3schools.com/html/tryit.asp?filename=tryhtml_default
Since, they have disabled the integration of javascript directly into LaTeX. It's a bit tricky to run scripts like the one in the name game now. For that you need to create a html file first and then integrate javascripts in it.
Its because of the fake suspensions right?
More about html: http://www.w3schools.com/html/html_examples.asp W3schools is a great website btw!
Not really but cybershadow brought some major issues like it was possible earlier to integrate such scripts in LaTeX which if a moderator clicks, could suspend someone in real without his knowledge.
O_O
lol
That's why they enabled safe mode in mathjax....
How would we make this html file and integrate javascripts into it?
You use, <script>code</script> ...
You can create a html file by simply using notepad. Try this out Open a notepad and write, <!DOCTYPE html> <html> <head>This is the header</head> <body> <h1>I am asgardian</h1> </body> </html>
Hmm. So you attached your name game in html to some post and then you shortened the link for the attachment and made the name game...
Save the file and then rename it something.htm
Yes
O_O THATS MINE
What's that?
Nopes, You will see your's and I'll see mine :D
OOOHHHH
You can use this to learn various javascript elements. http://www.w3schools.com/js/
NO!
lol
really O_O
Do it @Nnesha . You will have fun
i did
:(
nope O.o
You basically view the page source and then used java script to make that command come up
took the page source and then added the javascript.
yep
O_O @e.mccormick is here
YAY! :D
Um... they asked to learn Java and you are discussing JavaScript. Those are like cousins by marriage. Similar name but no real relation.
That's not my fault tbh.....:)
O_O LOL
lol
It says javascripts now. Happy :P
It is not a matter of happiness. It is a matter of what you want to learn.
Need to go now...will continue it later :)
<------------lol same here bye guysssssssssssssssssssssssssssssssssssssssssssssss
They actually wanted to learn javascript but wrote java.
:( bye
Yes, well, if they wanted to learn Java I know of a few free textbooks and use it to play around with my phone.
@Abhisar so in the name game you made it redirect to the page. How did you do that? O_O
Added a script of that ``` window.open ```
ok. Cool!
*of=for
you add the script right at the end. Right?
Yes.
So @Abhisar How would I attach it here? And so that when you click it, it works on OS and not only my laptop?
use the attach file button
And after that? won't it make us download? O_O
Click it to open, as it opens in new tab, copy the link and you are ready to go.
:o Interesting
I want to learn, but I just don't know, LOL
just right click and "view page source" . Copy and paste that into a notepad and save it as a htm. And at the end of the script before it ends you add the javascripts!
@Abhisar teach me too...
xD
Ok Shruti first thing that you do is right-click your mouse and press view page source.
And then you copy the whole code and you post it in a notepad and save it as .htm
And then you just add javascripts to make the warning/suspension box pop up and you can put whatever text you want. Then we added another javascript that once you press ok it will take you to the home page of OpenStudy
tbh I just took Abhisars and added the last javascript and changed the text for the warning to make it seem like a legit one xD
I'm scared to click :O
it says I issued myself a warning lol that wasn't the message I gave it :/
haha
not doing it again.....
Chrome blocked pop up :/
what am i doing wrong?
i just added `window.open('testing')` before the end of the body how are you customizing the message? where are you writing the js?
oh did i mean to do console.log('') ? I am forgetting the little js I once new
Yuh,, `window.open()` will not work unless it is executed by clicking a button. Chrome and other modern browsers block windows opened by java codes. Just add an alert box `alert('message')` in the original openStudy source code :D
*java = javascript,
Oh I see what I am doing wrong, how are you getting the url?
I just upload the html file using Attach file. Then open that attchment, copy the url and embedd it into LaTeX ;)
oh wow I even failed at that
Yes, you can delete it after copying the attachment.
*copying the URL
ok, I understand that now but why did I not get the css?
One min..lemme check.
thanks, I am a CS noob in many ways still :/
but how do you change the message? and why didn't it work when I copied the html into a text editor myself? why isn't it formatting :( I want to understand, not just copy what you guys did
oh i see that file is called "view source assets.openstudy" and mine is just "view source openstudy" where did you get the assets file?
ok I see where to change the message in the file you have, but I still want to know where you got the assets file
Ok I am being stupid. I thought you can just view page source and copy-paste it all into an html file and open it and see a formatted copy of the web page, but apparently that doesn't work. What am I supposed to do besides `view page source->save as (.html) ->open with chrome` ?
Sorry, got kicked out due to lag :( Here is the thing. Just copy the source code from the OpenStudy home page (make sure you are logged out while doing that or else it will show your name too and will not look like a real suspension) Then you need to add a script which will show the suspension message. ``` <script> alert('write your message here'); </script> ``` You need to embed the above code inside the `<body></body>` element of the page. Once you are done with the above steps, upload your html file using Attach File. Open the attachment and copy the link. After that you can embed it into LaTeX using \href{}{}.
I think that is the same as what I have been doing but I will try
Join our real-time social learning platform and learn together with your friends!