html
html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!--
Pieces of code by me to use later in my projects.
Use them if you want, no need to give credits
Adding new things by time
Also pls don't care abot some labels not making sense, this is because I Copy-Paste this to my other codes so it is easier for me
-->
<!--
Useful codes for web v1.9
Created by Maneren
Last update 13.2.2019
Change log:
1.0 - initial release
1.1 - started adding Math functions
1.2 - added DOM selecting and FPS counter
1.3 - added CSS button
1.4 - added more from Math
1.5 - added typing to HTML
1.6 - added fonts and keypress event
1.7 - added map and forEach comparison
1.8 - added scientific notation and factorial
1.9 - added alert box
1.10 - added toggle
-->
<!--My standard header-->
Enter to Rename, Shift+Enter to Preview
css
css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
body {
background-color: #6d5;
}
/*General white button style*/
button{
background-color: #FFF;
color: #000;
border-color: #FFF;
border-radius:5px;
}
/*For removing outlines for buttons and inputs*/
button:focus, input:focus{
outline:none;
}
Enter to Rename, Shift+Enter to Preview
js
js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
///-->Imported from "Useful codes for web" code by me
////-->HTML selecting functions<--///
//DOM selecting shorthands
class HTMLSelect{
static id(){
document.getElementById.bind(document);
}
static classes(){
document.getElementsByClassName.bind(document);
}
static tags(){
document.getElementsByTagName.bind(document);
}
static query(){
document.querySelector.bind(document);
}
static queryAll(){
document.querySelectorAll.bind(document);
}
}
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run