Some random html projects
Here is where I’ll upload html proyects. Mostly small scripts for fun. To be viewed directly on a browser: https://trianguloy.github.io/githubPages
Feel free to edit/adapt/use them as you want, but please mention me! (link to this github is enough). Also you can send me a message so I’ll know if I’m being useful to someone!
https://trianguloy.github.io/githubPages/Player/main.html
Load a wav sample and play the piano with it.
https://trianguloy.github.io/githubPages/Visor/visor.html
Displays a video from a url directly on the browser (without downloading). It uses the video player of the browser, so unfortunately it only appears to work with some files and some browsers. [It seems to work with most .mp4 files on firefox and chrome, also with some .mkv on chrome, some audios too, …].
You can append the url of the video after a “?” to autoload a predefined url (will be also autoplayed if the browser allows it, otherwise you need to press play). For example: https://trianguloy.github.io/githubPages/Visor/visor.html?https://sample-videos.com/video123/mp4/240/big_buck_bunny_240p_30mb.mp4
[ 20% cooler version: https://trianguloy.github.io/githubPages/Visor/YPvisor.html ]
https://trianguloy.github.io/githubPages/Encrypter/encrypter.html
Encrypts any html using the AES cypher. It was created to encrypt blogger posts for a friend, but can be used with any html, or even text. The generator generates a ready-to-use html that will ask for a password, and when entered correctly it will be replaced with the encrypted html.
Uses the CryptoJS library: https://cryptojs.gitbook.io/docs/
Note: the text is encrypted using the password itself, and the MD5 of the original text is also present to check for decryption validity. I’m unaware of security issues this may have (other than brute force or whatever the CryptoJS library has, if any) so I can not guarantee a perfect encryption. Still it should be more than enough for casual users that check source code.
https://trianguloy.github.io/githubPages/javascriptEval/javascriptEval.html
Enter any script in the textbox and press the Eval button. The script will run in the page. That’s all.
Why? Let me explain. Sometimes you need to report a bug when using a specific script (for example an explot for a undiscovered attack) and you need an online page so others can test it directly. Most of the times the script is easy and short, but still you need a server to publish it, and not all people have a server.
‘Oh! I know. I’ll use one of the thousands of editors available on the web.’
Yes, that’s a solution…except when you discover that all of them (or maybe the 99%, but I didn’t find that 1%) use an iframe or similar to encapsulate the code/html/css. This is done either for convenience or simply to avoid problems between the host page and the running code.
However this has problems, because the entered code is running constrained inside a container, where some functions/properties are not available. For example. You can’t change the window title: document.title = "my title"
.
Basically by using eval the entered code is run directly on the page. This can lead to serious consecuences if the code is malicious or uses an exploit … however that’s precisely why it was created!
You have full control over the page, you can even delete the editor itself: document.body.removeChild(document.getElementById('javascriptEval'))
and remember you can add buttons or other things too let btn = document.createElement('button'); btn.innerHTML = 'Press me'; btn.onclick = ()=> alert("Hello"); document.body.appendChild(btn);
. This is also the reason why the page is so simple and dumb. It was designed as a way to share scripts that can be run directly. That’s why there are only three buttons: run (eval), share, and info.
https://trianguloy.github.io/githubPages/derpiViewer/derpiViewer.html
This page allows you to search any query from derpibooru and display the results in an endless scrollable view.
The page was developed mainly from a mobile device using a text editor, so I apologize for the unconventional programming (latter was prettified using a computer). In any case I think it is pretty good and the reason why raw html is so powerful and easy to use. No frameworks, no libraries, nothing. All in a single file, and it works fine!
Contains some configuration to suit each need. This was made for personal use from a mobile device and may or may not update it, depending on how much I use it, but if you find it useful any discussion/request is welcomed.
https://trianguloy.github.io/githubPages/Petr/petr.html
This is a custom implementation of the Petr–Douglas–Neumann theorem.
This was made as a response to the Petr’s miracle: Why was it lost for 100 years? (Mathologer Masterclass) video by Mathologer.