-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
1745 lines (1668 loc) · 93.1 KB
/
index.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>General Functions</title>
<style>
div.examples {
margin-left: 30px;
}
button.showSectioBtn {
padding: 10px;
background: black;
color: white;
}
button[onclick^="toggleButtonSwitch"],
button.exampleButton {
padding: 4px;
border: 1px solid black;
background: dimgray;
color: white;
}
a {
margin: 10px;
}
</style>
</head>
<body>
<h1>General Functions Preview</h1>
<hr>
<div class="examples">
<h4>Removing Elements Examples:</h4><hr>
<div id="exampleHTML">
<div id="keepWrapt">
<button class="showSectioBtn" onclick="changeNextElementDisplay(this, this.nextElementSibling)">Show Remove Element Examples</button><br>
<div style="display:none">
<!-- remove space -->
<span>
<p><strong>removeSpace("removesSpaceInText", "u")</strong></p>
<button onclick="toggleButtonSwitch(this);
if (this.dataset.togglebuttonswitch == 1) { this.innerHTML = this.innerHTML.replace('Run', 'Reset'); }
if (this.dataset.togglebuttonswitch == 0) { this.innerHTML = this.innerHTML.replace('Reset', 'Run'); }
" data-togglebuttonswitch="0" data-toggle-X="removeSpace('removesSpaceInText', 'u')" data-toggle-y="document.getElementById('removesSpaceInText').innerHTML = document.getElementById('resetRemoveSpace').innerHTML">Run removeSpace() Function</button><br>
<div id="resetRemoveSpace" style="display:none">
This is a div element with following attributes: <br>
--- class="item" <br>
--- id="removesSpaceInText" <br>
--- style="display:block; margin-left: 30px" <br>
--- data-name="Value in Attribute data-name index 0" <br>
--- value="text in value attribute" <br>
</div>
<div class="item" id="removesSpaceInText"
style="display:block; margin-left: 30px"
data-name="Value in Attribute data-name index 0"
value="text in value attribute">
This is a div element with following attributes: <br>
--- class="item" <br>
--- id="removesSpaceInText" <br>
--- style="display:block; margin-left: 30px" <br>
--- data-name="Value in Attribute data-name index 0" <br>
--- value="text in value attribute" <br>
</div>
</span>
<!-- rmove space in variable -->
<span>
<p><strong>removeSpaceInVariable(withSpace, 'l');</strong><br>
var withSpace = "This variables SPACE will be removed";</p>
<button onclick="toggleButtonSwitch(this);
if (this.dataset.togglebuttonswitch == 1) { this.innerHTML = this.innerHTML.replace('Run', 'Reset'); }
if (this.dataset.togglebuttonswitch == 0) { this.innerHTML = this.innerHTML.replace('Reset', 'Run'); }
"
data-togglebuttonswitch="0"
data-toggle-X="(function () {
var withSpace = 'This variables SPACE will be removed';
var withoutSpace = removeSpaceInVariable(withSpace, 'l');
document.getElementById('removeSpaceInVariableEx').innerHTML = withoutSpace;
}) ()"
data-toggle-y="document.getElementById('removeSpaceInVariableEx').innerHTML = document.getElementById('resetRemoveSpaceInVariable').innerHTML">Run removeSpaceInVariable() Function</button><br>
<div id="resetRemoveSpaceInVariable" style="display:none">
</div>
<div id="removeSpaceInVariableEx">
</div><br>
</span>
<!-- remove word -->
<span>
<p><strong>removeWord('removeTheWord', 'removeTheWord')</strong></p>
<button onclick="toggleButtonSwitch(this);
if (this.dataset.togglebuttonswitch == 1) { this.innerHTML = this.innerHTML.replace('Run', 'Reset'); }
if (this.dataset.togglebuttonswitch == 0) { this.innerHTML = this.innerHTML.replace('Reset', 'Run'); }
"
data-togglebuttonswitch="0"
data-toggle-X="removeWord('removeTheWord', 'removeTheWord')"
data-toggle-y="document.getElementById('removeTheWord').innerHTML = document.getElementById('resetRemoveTheWord').innerHTML">Run removeWord() Function</button><br>
<div id="resetRemoveTheWord" style="display:none">
This is a div element with id attribute removeTheWord.
</div>
<div id="removeTheWord">This is a div element with id attribute removeTheWord.</div><br>
</span>
<!-- remove word in variable -->
<span>
<p><strong>removeWordInVariable('remove', withWord)()</strong><br>
var withWord = 'The word remove is removed when removes used.';</p>
<button onclick="toggleButtonSwitch(this);
if (this.dataset.togglebuttonswitch == 1) { this.innerHTML = this.innerHTML.replace('Run', 'Reset'); }
if (this.dataset.togglebuttonswitch == 0) { this.innerHTML = this.innerHTML.replace('Reset', 'Run'); }
"
data-togglebuttonswitch="0"
data-toggle-X="(function () {
var withWord = 'The word remove is removed when removes used.';
var withoutWord = removeWordInVariable('remove', withWord);
document.getElementById('removeWordInVariableEx').innerHTML = withoutWord;
}) ()"
data-toggle-y="document.getElementById('removeWordInVariableEx').innerHTML = document.getElementById('resetremoveWordInVariable').innerHTML">Run removeWordInVariable() Function</button><br>
<div id="resetremoveWordInVariable" style="display:none">
</div>
<div id="removeWordInVariableEx">
</div><br>
</span>
<!-- remove HTML Tag I -->
<span>
<h4>I.</h4>
<p><strong>removeHTMLTag('div', 'removeHTMLTag', 'class0')</strong></p>
<button onclick="toggleButtonSwitch(this);
if (this.dataset.togglebuttonswitch == 1) { this.innerHTML = this.innerHTML.replace('Run', 'Reset'); }
if (this.dataset.togglebuttonswitch == 0) { this.innerHTML = this.innerHTML.replace('Reset', 'Run'); }
"
data-togglebuttonswitch="0"
data-toggle-X="removeHTMLTag('div', 'removeHTMLTag', 'class0', 0)"
data-toggle-y="document.getElementById('removeHTMLTagEx').innerHTML = document.getElementById('resetremoveHTMLTag').innerHTML">Run removeHTMLTag() Function</button><br>
<div id="resetremoveHTMLTag" style="display:none">
<div class="removeHTMLTag">
<div><div>This is the first [0] class "removeHTMLTag".</div></div>
<p><p>This is p tag so not removed.</p></p>
<div><div>Next div in class "removeHTMLTag" at index 0 in div element and text in tag that will be removed.</div></div>
</div>
</div>
<div id="removeHTMLTagEx" class="removeHTMLTag">
<div class="removeHTMLTag">
<div><div>This is the first [0] class "removeHTMLTag".</div></div>
<p><p>This is p tag so not removed.</p></p>
<div><div>Next div in class "removeHTMLTag" at index 0 in div element and text in tag that will be removed.</div></div>
</div>
</div><br>
</span>
<!-- remove HTML Tag II -->
<span>
<h4>II.</h4>
<p><strong>removeHTMLTag('div', 'removeHTMLTag', 'classl', 'self')</strong></p>
<button onclick="toggleButtonSwitch(this);
if (this.dataset.togglebuttonswitch == 1) { this.innerHTML = this.innerHTML.replace('Run', 'Reset'); }
if (this.dataset.togglebuttonswitch == 0) { this.innerHTML = this.innerHTML.replace('Reset', 'Run'); }
"
data-togglebuttonswitch="0"
data-toggle-X="removeHTMLTag('div', 'removeHTMLTagII', 'classl', 'self')"
data-toggle-y="document.getElementById('removeHTMLTagExII').innerHTML = document.getElementById('resetremoveHTMLTagII').innerHTML">Run removeHTMLTag() Function</button><br>
<div id="resetremoveHTMLTagII" style="display:none">
<div class="removeHTMLTagII">
<div><div>This is the first [0] class "removeHTMLTag".</div></div>
<p><p>This is p tag so not removed.</p></p>
<div class="removeHTMLTagII"><div class="removeHTMLTagII">If parElementIdentifier was just class then all tags with class "removeHTMLTagII" removed.</div></div>
<div class="removeHTMLTagII"><div class="removeHTMLTagII">WLL BE REMOVED and next div in class "removeHTMLTag" at index 0 in div element and text in tag that will be removed.</div></div>
</div>
</div>
<div id="removeHTMLTagExII" class="removeHTMLTagII">
<div class="removeHTMLTag">
<div><div>This is the first [0] class "removeHTMLTag".</div></div>
<p><p>This is p tag so not removed.</p></p>
<div class="removeHTMLTagII"><div class="removeHTMLTagII">If parElementIdentifier was just class then all tags with class "removeHTMLTagII" removed.</div></div>
<div class="removeHTMLTagII"><div class="removeHTMLTagII">WLL BE REMOVED and next div in class "removeHTMLTag" at index 0 in div element and text in tag that will be removed.</div></div>
</div>
</div><br>
</span>
<!-- remove New lines -->
<span>
<p><strong>removeNewLines('removeNewLinesEx', 'id', 1)</strong></p>
<button onclick="toggleButtonSwitch(this);
if (this.dataset.togglebuttonswitch == 1) { this.innerHTML = this.innerHTML.replace('Run', 'Reset'); }
if (this.dataset.togglebuttonswitch == 0) { this.innerHTML = this.innerHTML.replace('Reset', 'Run'); }
"
data-togglebuttonswitch="0"
data-toggle-X="removeNewLines('removeNewLinesEx', 'id', 1)"
data-toggle-y="document.getElementById('removeNewLinesEx').innerHTML = document.getElementById('resetremoveNewLines').innerHTML">Run removeNewLines() Function</button><br>
<div id="resetremoveNewLines" style="display:none">
All the
new lines
will
be removed.
</div>
<pre id="removeNewLinesEx"><pre id="removeNewLinesEx">
All the
new lines
will
be removed.
</pre></pre><br>
</span>
<!-- remove last word -->
<span>
<p><strong>removeLastWord('last', 'remove-last-word', 'data0, 0')</strong></p>
<p><strong>removeLastWord('last', 'remove-last-word', 'data1, 1')</strong></p>
<button onclick="toggleButtonSwitch(this);
if (this.dataset.togglebuttonswitch == 1) { this.innerHTML = this.innerHTML.replace('Run', 'Reset'); }
if (this.dataset.togglebuttonswitch == 0) { this.innerHTML = this.innerHTML.replace('Reset', 'Run'); }
"
data-togglebuttonswitch="0"
data-toggle-X="(function () {
removeLastWord('last', 'remove-last-word', 'data0', 0)
removeLastWord('last', 'remove-last-word', 'data1', 1)
}) ()"
data-toggle-y="(function () {
document.getElementById('removeLastWord').innerHTML = document.getElementById('resetremoveLastWord').innerHTML;
document.getElementById('removeLastWordII').innerHTML = document.getElementById('resetremoveLastWordII').innerHTML;
}) ()">Run removeLastWord() Function</button><br>
<div id="resetremoveLastWord" style="display:none">
The last instance of the word last will be removed using "removeLastWord" function, removing last word.
</div>
<div data-remove-last-word="index 0"><div id="removeLastWord" data-remove-last-word="1">
The last instance of the word last will be removed using "removeLastWord" function, removing last word.
</div></div>
<div id="resetremoveLastWordII" style="display:none">
The last instance of the word last will be removed using "removeLastWord" function, removing word and ignoring case.
</div>
<div data-remove-last-word="index 1"><div id="removeLastWordII" data-remove-last-word="1">
The last instance of the word last will be removed using "removeLastWord" function, removing word and ignoring case.
</div></div>
<br>
</span>
<!-- 7 remove last word in variable -->
<span>
<p><strong>removeLastWordInVariable(removeLastWordVar, 'last')</strong><br>
var removeLastWordVar = "The last instance of the word last is removed if it is last."</p>
<button onclick="toggleButtonSwitch(this);
if (this.dataset.togglebuttonswitch == 1) { this.innerHTML = this.innerHTML.replace('Run', 'Reset'); }
if (this.dataset.togglebuttonswitch == 0) { this.innerHTML = this.innerHTML.replace('Reset', 'Run'); }
"
data-togglebuttonswitch="0"
data-toggle-X="(
function () {
var removeLastWordVar = 'The last instance of the word last is removed if it is last.';
document.getElementById('removeLastWordInVariable').innerHTML = removeLastWordInVariable(removeLastWordVar, 'last');
}
) ()"
data-toggle-y="document.getElementById('removeLastWordInVariable').innerHTML = document.getElementById('resetremoveLastWordInVariable').innerHTML">Run removeLastWordInVariable() Function</button><br>
<div id="resetremoveLastWordInVariable" style="display:none">
</div>
<div id="removeLastWordInVariable">
</div><br>
</span>
<!-- 7 remove html attribute -->
<span>
<p><strong>removeHTMLAttribute('style', 'removeAttribute', 'class1')</strong></p>
<button onclick="toggleButtonSwitch(this);
if (this.dataset.togglebuttonswitch == 1) { this.innerHTML = this.innerHTML.replace('Run', 'Reset'); }
if (this.dataset.togglebuttonswitch == 0) { this.innerHTML = this.innerHTML.replace('Reset', 'Run'); }
"
data-togglebuttonswitch="0"
data-toggle-X="removeHTMLAttribute('style', 'removeAttribute', 'class1')"
data-toggle-y="document.getElementById('removeAttribute').innerHTML = document.getElementById('resetremoveAttribute').innerHTML">Run removeAttribute() Function</button><br>
<div id="resetremoveAttribute" style="display:none">
<div class="removeAttribute" style="background:black; color: white;">The style attribute will be removed.</div>
</div>
<div id="removeAttribute">
<div class="removeAttribute" style="background:black; color: white;">The style attribute will be removed.</div>
</div><br>
</span>
<hr>
</div>
<h4>Replacing Elements Examples:</h4><hr>
<button class="showSectioBtn" onclick="changeNextElementDisplay(this, this.nextElementSibling)">Show Replacing Element Examples</button><br>
<div style="display:none">
<!-- replace word -->
<span>
<p><strong>replaceWord('---', '!-', 'replaceWord', 'class0')</strong></p>
<button onclick="toggleButtonSwitch(this);
if (this.dataset.togglebuttonswitch == 1) { this.innerHTML = this.innerHTML.replace('Run', 'Reset'); }
if (this.dataset.togglebuttonswitch == 0) { this.innerHTML = this.innerHTML.replace('Reset', 'Run'); }
"
data-togglebuttonswitch="0"
data-toggle-X="replaceWord('---', '!-', 'replaceWord', 'class0')"
data-toggle-y="document.getElementById('replaceWordEx').innerHTML = document.getElementById('resetreplaceWord').innerHTML">Run replaceWord() Function</button><br>
<div id="resetreplaceWord" style="display:none">
This is a div with no attributes but two a tags with the following attributes: <br>
--- class="link" <br>
--- 1. href="https://practicing.xyz" (<em>changed in a example</em>)<br>
--- 2. href="https://gitHub.com" <br>
--- target="_blank" <br>
</div>
<div id="replaceWordEx" class="replaceWord">
<div class="replaceWord">
This is a div with no attributes but two a tags with the following attributes: <br>
--- class="link" <br>
--- 1. href="https://practicing.xyz" (<em>changed in a example</em>)<br>
--- 2. href="https://gitHub.com" <br>
--- target="_blank" <br>
</div>
</div><br>
</span>
<!-- replace inner html -->
<span>
<p><strong>replaceInnerHTML('Ariticle HTML replaced', 'article', 'tag1')</strong></p>
<button onclick="toggleButtonSwitch(this);
if (this.dataset.togglebuttonswitch == 1) { this.innerHTML = this.innerHTML.replace('Run', 'Reset'); }
if (this.dataset.togglebuttonswitch == 0) { this.innerHTML = this.innerHTML.replace('Reset', 'Run'); }
"
data-togglebuttonswitch="0"
data-toggle-X="replaceInnerHTML('Ariticle HTML replaced', 'article', 'tag1')"
data-toggle-y="document.getElementById('replaceInnerHTMLEx').innerHTML = document.getElementById('resetreplaceInnerHTML').innerHTML">Run replaceInnerHTML() Function</button><br>
<div id="resetreplaceInnerHTML" style="display:none">
<article>
This is an article with the following attributes: <br>
--- class="itemTwo" <br>
--- style="display:block; margin-left: 30px" <br>
--- data-href="Value in Attribute data-href index 0" <br>
--- value="text in value attribute" <br>
</article>
</div>
<div id="replaceInnerHTMLEx">
<article>
This is an article with the following attributes: <br>
--- class="itemTwo" <br>
--- style="display:block; margin-left: 30px" <br>
--- data-href="Value in Attribute data-href index 0" <br>
--- value="text in value attribute" <br>
</article>
</div><br>
</span>
<!-- replace attribute -->
<span>
<p><strong>replaceAttribute('href', 'https://practicing.xyz/Exercises.html', 'link', 'class0')</strong></p>
<button onclick="toggleButtonSwitch(this);
if (this.dataset.togglebuttonswitch == 1) { this.innerHTML = this.innerHTML.replace('Run', 'Reset'); }
if (this.dataset.togglebuttonswitch == 0) { this.innerHTML = this.innerHTML.replace('Reset', 'Run'); }
"
data-togglebuttonswitch="0"
data-toggle-X="replaceAttribute('href', 'https://practicing.xyz/Exercises.html', 'link', 'class2')"
data-toggle-y="document.getElementById('replaceAttributeEx').innerHTML = document.getElementById('resetreplaceAttribute').innerHTML">Run replaceAttribute() Function</button><br>
<div id="resetreplaceAttribute" style="display:none">
<a class="link" href="https://practicing.xyz" target="_blank">Practicing.XYZ Site</a> <pre style="display:inline"><- link will change</pre>
<a class="link" href="https://gitHub.com" target="_blank">GitHub Home Page</a>
</div>
<div id="replaceAttributeEx">
<a class="link" href="https://practicing.xyz" target="_blank">Practicing.XYZ Site</a> <pre style="display:inline"><- link will change</pre>
<a class="link" href="https://gitHub.com" target="_blank">GitHub Home Page</a>
</div><br>
</span>
<!-- replace new lines I -->
<span>
<h4>I.</h4>
<p><strong>replaceNewLines('-s-', 'replaceNewLinesEx, 'id', 1, 1, 0)</strong></p>
<button onclick="toggleButtonSwitch(this);
if (this.dataset.togglebuttonswitch == 1) { this.innerHTML = this.innerHTML.replace('Run', 'Reset'); }
if (this.dataset.togglebuttonswitch == 0) { this.innerHTML = this.innerHTML.replace('Reset', 'Run'); }
"
data-togglebuttonswitch="0"
data-toggle-X="replaceNewLines('-s-', 'replaceNewLinesExI', 'id', 1, 1, 0)"
data-toggle-y="document.getElementById('replaceNewLinesExI').innerHTML = document.getElementById('resetreplaceNewLinesExI').innerHTML">Run replaceNewLines() Function</button><br>
<button onclick="changeNextElementDisplay(this, this.nextElementSibling)">Show text used</button><br>
<pre style="display:none">
<div id="resetreplaceNewLinesExI">
All of the
New lines in this element will
be replaced with the character specified
end
of example
.
</div></pre>
<pre id="replaceNewLinesEx"><pre id="replaceNewLinesExI">
All of the
New lines in this element will
be replaced with the character specified
end
of example
.
</pre></pre><br>
</span>
<!-- replace new lines II -->
<span>
<h4>II.</h4>
<p><strong>replaceNewLines('-s-', 'replaceNewLinesEx, 'id', 1, 1, 2)</strong></p>
<button onclick="toggleButtonSwitch(this);
if (this.dataset.togglebuttonswitch == 1) { this.innerHTML = this.innerHTML.replace('Run', 'Reset'); }
if (this.dataset.togglebuttonswitch == 0) { this.innerHTML = this.innerHTML.replace('Reset', 'Run'); }
"
data-togglebuttonswitch="0"
data-toggle-X="replaceNewLines('-s-', 'replaceNewLinesEx', 'id', 1, 1, 2)"
data-toggle-y="document.getElementById('replaceNewLinesEx').innerHTML = document.getElementById('resetreplaceNewLinesEx').innerHTML">Run replaceNewLines() Function</button><br>
<button onclick="changeNextElementDisplay(this, this.nextElementSibling)">Show text used</button><br>
<pre style="display:none">
<div id="resetreplaceNewLinesEx">
All of the
New lines in this element will
be replaced with the character specified <br><br>
unless
a line is <br><br>
greater-than
in number of words (or number of spaces) the number specified
in the "mindword" parameter,
then lines after that line <br><br>
will be joined without split character
until there is a line with word(s) or <br><br>
spaces
that are less than the <br><br>
number
specified in the "mindElement" parameter
then the split character will be added and <br><br>
All
lines (first empty line is indented, next is not)
following the above mentioned pattern will be skipped.
This is good to make an arrary where the pattern <br><br>
follows a "term" and "definition" like pattern.
<br><br>
end
of example
.
</div></pre>
<strong>NOTE</strong> - for readability there are "<br>" tags in example.
<pre id="replaceNewLinesEx"><pre id="replaceNewLinesEx">
All of the
New lines in this element will
be replaced with the character specified <br><br>
unless
a line is <br><br>
greater-than
in number of words (or number of spaces) the number specified
in the "mindword" parameter,
then lines after that line <br><br>
will be joined without split character
until there is a line with word(s) or <br><br>
spaces
that are less than the <br><br>
number
specified in the "mindElement" parameter
then the split character will be added and <br><br>
All
lines (first empty line is indented, next is not)
following the above mentioned pattern will be skipped.
This is good to make an arrary where the pattern <br><br>
follows a "term" and "definition" like pattern.
<br><br>
end
of example
.
</pre></pre><br>
</span>
<hr>
</div>
<h4>Appending/Prepending/Add Elements:</h4><hr>
<button class="showSectioBtn" onclick="changeNextElementDisplay(this, this.nextElementSibling)">Show Appending/Prepending/Add Element Examples</button><br>
<div style="display:none">
<!-- add to attribute -->
<span>
<p>
<strong>addToAttribute('style', '; background: black; color: white;', 'after', 'addToAttribute', 'class1', 0)</strong> <br>
<strong>addToAttribute('style', '; background: black; color: white;', 'after', 'addToAttributeII', 'class', 1)</strong>
</p>
<button onclick="toggleButtonSwitch(this);
if (this.dataset.togglebuttonswitch == 1) { this.innerHTML = this.innerHTML.replace('Run', 'Reset'); }
if (this.dataset.togglebuttonswitch == 0) { this.innerHTML = this.innerHTML.replace('Reset', 'Run'); }
"
data-togglebuttonswitch="0"
data-toggle-X="(
function () {
addToAttribute('style', '; background: black; color: white;', 'after', 'addToAttribute', 'class1', 0);
addToAttribute('style', '; background: black; color: white;', 'after', 'addToAttributeII', 'class', 1);
}
) ()"
data-toggle-y="(
function () {
var keepresetaddToAttribute = document.getElementById('resetaddToAttribute').innerHTML;
addToAttribute('class', 'I', 'after', 'addToAttributeI', 'class', 1);
document.getElementById('addToAttributeEx').innerHTML = document.getElementById('resetaddToAttribute').innerHTML;
document.getElementById('resetaddToAttribute').innerHTML = keepresetaddToAttribute;
}
) ()">Run addToAttribute() Function</button><br>
<div id="resetaddToAttribute" style="display:none">
<div class="addToAttribute" style="text-decoration:underline">Add to attribute.</div>
<div class="addToAttributeI" style="text-decoration:underline">Add to attribute.</div>
<div class="addToAttributeI" style="text-decoration:underline">Add to attribute.</div>
<div class="addToAttributeI" style="text-decoration:underline">Add to attribute.</div>
</div>
<div id="addToAttributeEx">
<div class="addToAttribute" style="text-decoration:underline">Add to attribute.</div>
<div class="addToAttributeII" style="text-decoration:underline">Add to attribute.</div>
<div class="addToAttributeII" style="text-decoration:underline">Add to attribute.</div>
<div class="addToAttributeII" style="text-decoration:underline">Add to attribute.</div>
</div><br>
</span>
<!-- add html to text -->
<span>
<p><strong>addHTMLToText('strong', 'addHTMLToText', 'class1', 'style:: color: blue', 'EXAMPLE')</strong></p>
<button onclick="toggleButtonSwitch(this);
if (this.dataset.togglebuttonswitch == 1) { this.innerHTML = this.innerHTML.replace('Run', 'Reset'); }
if (this.dataset.togglebuttonswitch == 0) { this.innerHTML = this.innerHTML.replace('Reset', 'Run'); }
"
data-togglebuttonswitch="0"
data-toggle-X="addHTMLToText('strong', 'addHTMLToText', 'class1', 'style:: color: blue', 'EXAMPLE')"
data-toggle-y="document.getElementById('addHTMLToTextEx').innerHTML = document.getElementById('resetaddHTMLToText').innerHTML">Run addHTMLToText() Function</button><br>
<div id="resetaddHTMLToText" style="display:none">
<div class="addHTMLToText">
<div class="addHTMLToText"> <br>
All instances of EXAMPLE in this tag will be wrapped. <br>
EXAMPLE - the left example will change. <br>
EXAMPLE: <br>
so will the above example text. <br>
</div>
</div>
</div>
<div id="addHTMLToTextEx">
<div class="addHTMLToText">
<div class="addHTMLToText"> <br>
All instances of EXAMPLE in this tag will be wrapped. <br>
EXAMPLE - the left example will change. <br>
EXAMPLE: <br>
so will the above example text. <br>
</div>
</div>
</div>
</span>
<!-- sequential Section Ordered List Items -->
<span>
<h3>sequentialSectionOrderedListItems('attribute', '[data-section="1"]')</h3>
<button class="exampleButton" onclick="
changeNextElementDisplay(this, this.nextElementSibling);
if (this.innerHTML.indexOf('Run ') > -1) {
this.innerHTML = this.innerHTML.replace('Run', 'Hide');
var ORIGINAL_Terms_of_Service_and_Payment_Agreement = document.getElementById('ORIGINAL_Terms_of_Service_and_Payment_Agreement');
ORIGINAL_Terms_of_Service_and_Payment_Agreement.innerText = document.getElementById('Terms_of_Service_and_Payment_Agreement').innerHTML;
sequentialSectionOrderedListItems('attribute', '[data-section=\'1\']');
} else {
this.innerHTML = this.innerHTML.replace('Hide', 'Show');
}
">Run sequentialSectionOrderedListItems()</button>
<div id="sequentialSectionOrderedListItems" style="display:none">
<br>
<div>
<button onclick="
changeNextElementDisplay(this, this.nextElementSibling);
">Show Original Text</button>
<div id="ORIGINAL_Terms_of_Service_and_Payment_Agreement" style="display:none"></div>
</div>
<div id="Terms_of_Service_and_Payment_Agreement">
<style>
div.paymentContract ol, div.paymentContract ol li {
list-style: none !important;
}
</style>
<div class="paymentContract">
<h1>
Terms of Service and Payment Agreement
</h1>
<hr>
<h2>
Terms of Service and Payment Agreement between Flint River Fuel Center and Prospective Customer
</h2>
<p>
This Contract for Account Setup ("Contract") is being presented to the Prospective Customer as a Customer on the current day's date, which will be recorded once the form has been successfully submitted.
</p>
<br><br>
<div data-section="1">
<h3>
Mutuality of Obligation:
</h3>
<ol>
<li>
<strong>Parties:</strong>
<ol>
<li>Company: Flint River Fuel Center, an S Corporation organized under the laws of Georgia, with its principal place of business at 2568 GA-49 Oglethorpe, GA 31068.</li>
<li>Customer: The party agreeing to pay Invoices, an individual/entity or representative for an individual/entity agreeing to the terms and conditions of this Contract.</li>
</ol>
</li>
<li>
<strong>Services:</strong>
<ol>
<li>Company agrees to provide diesel fuel to Customer in accordance with the terms outlined in this Contract.</li>
<li>Customer agrees that they will stay current with weekly invoices received, paying each in a timely manner.</li>
</ol>
</li>
<li>
<strong>Invoicing:</strong>
<ol>
<li>Company agrees to invoice the Customer weekly or for a set period of time, and each invoice shall specify the amount owed by Customer to Company for purchase made during prior week or a set period of time.</li>
<li>Customer agrees to receive weekly invoices from Company for purchases made.</li>
</ol>
</li>
<li>
<strong>Unpaid Amount and Overdue Charges:</strong>
<ol>
<li>Company agrees to provide Customer with prior notice to any charges being brought against them for any outstanding amount that is over 90 days due to the Company by the Customer.</li>
<li>
Customer acknowledges and agrees that any unpaid amount exceeding $500 ("Unpaid Total") shall result in legal action taken by Company.
<ol>
<li>Customer understands that failure to pay the Unpaid Total may result in legal action being brought against them.</li>
</ol>
</li>
</ol>
</li>
<li>
<strong>Credit Limit:</strong>
<ol>
<li>Company will set a Credit Limit for the Customer that will be determined by the Customer paying each Invoice amount in a timely manner.</li>
<li>Customer agrees that once the Unpaid Total reaches the credit limit specified by Company, Customer's account may be suspended until payment is made.</li>
</ol>
</li>
<li>
<strong>Legal Responsibility:</strong>
<ol>
<li>
Company is aware they are legally responsible to provide the Customer with updated and accurate information regarding the Customer's Invoice and any Overdue Amount, Unpaid Total, and Time Periods stating the sum of Unpaid Invoices for the corresponding Time Range.
</li>
<li>Customer acknowledges that they are legally responsible for the Unpaid Total and any associated charges, including but not limited to interest, legal fees, and penalties.</li>
</ol>
</li>
<li>
<strong>Termination:</strong>
<ol>
<li>Either party (Company or Customer) may terminate this Contract upon notice to the other party if the terms outlined herein are violated.</li>
</ol>
</li>
<li>
<strong>Governing Law:</strong>
<ol>
<li>This Contract shall be governed by and construed in accordance with the laws of Georgia.</li>
</ol>
</li>
<li>
<strong>Entire Agreement:</strong>
<ol>
<li>This Contract constitutes the entire agreement between Company and Customer and supersedes any prior agreements or understandings, whether written or oral.</li>
</ol>
</li>
<li>
<strong>Agreements, Digital Acknowledgement, and Digital Signature:</strong>
<ol>
<li>Company agrees to the terms of this contract by providing this contract to the Customer.</li>
<li>Prospective Customer's digital acknowledgement and digital signature holds them accountable as the Customer of this contract after it has been submitted, processed, and approved by the Company.
<ol class="dashList">
<li>
By digitally acknowledging and signing this contract the Prospective Customer declares they have read, understand, and agree to be bound by the terms and conditions of this Contract as defined for the Customer layed out for a Prospective Customer.
</li>
</ol>
</li>
</ol>
</li>
</ol>
</div>
<br>
<div data-section="1">
<h3>
Terms of Service and Payment:
</h3>
<ol>
<li>
<strong>Parties:</strong>
<p>This agreement is made between Flint River Fuel Center, located at 2568 GA-49 Oglethorpe, GA 31068, and Prospective Customer who, once acknowledging and accepting the terms of the contract becomes a Customer as defined in contract; collectively referred to as the "Parties".</p>
</li>
<li>
<strong>Invoice:</strong>
<p>
The Company shall issue weekly invoices to the Customer for purchases made. Each invoice shall detail the amount owed by the Customer and will be accompanied by a statement that will include Time Periods, Unpaid Invoices, and the Unpaid Total.
</p>
</li>
<li>
<strong>Statement and Overdue Amount:</strong>
<p>
The Company shall provide a weekly Statement to the Customer, detailing the total Unpaid Amounts and Unpaid Total. The Unpaid Total shall include all outstanding Invoices. Overdue Amounts shall be categorized based on the Time Range as specified in Section 4.
</p>
</li>
<li>
<strong>Time Ranges and Overdue Amounts:</strong>
<p>The Overdue Amounts shall be categorized into the following time ranges:</p>
<ol class="dashList">
<li>1 to 30 days</li>
<li>31 to 60 days</li>
<li>61 to 90 days</li>
<li>Over 90 days</li>
</ol>
</li>
<li>
<strong>Credit Limit and Max Amount:</strong>
<p>
The Credit Limit will start at $500 and if an unpaid amount of $500 or more is due in the Over 90 days Time Range, the Customer may be legally prosecuted, while at any amount below $500 the Customer is legally liable for the amount owed in the Over 90 days Time Range category. If the Unpaid Total exceeds the Credit Limit, the Customer shall be unable to make additional purchases until the balance is settled. The Max Amount for each time range shall be specified by the Company.
</p>
</li>
<li>
<strong>Legal Responsibility:</strong>
<p>
The Customer acknowledges that they are legally responsible for any Unpaid Total exceeding $500. Failure to settle the Unpaid Total within the specified time frame may result in legal action by the Company. This includes legal action being brought against the customer.
</p>
</li>
<li>
<strong>Legal Action:</strong>
<p>
The Customer understands that the Company reserves the right to pursue legal action against them for any Unpaid Total equal to or greater than $500 that is over 90 days due, and any Unpaid Total that is greater than $5,000. The Customer shall be notified of impending legal action before charges are filed.
</p>
</li>
<li>
<strong>Agreement Acknowledgement:</strong>
<p>
By signing this agreement, the Customer acknowledges that they have read, understood, and agreed to the terms outlined herein; therefore accepting all terms and obligations of this contract as defined for the Customer and Prospective Customer.
</p>
</li>
</ol>
</div>
</div>
</div>
</div>
</span>
<!-- sequentail roman numerals -->
<span>
<h3>sequentialSectionRomanNumeralItems('id', 'Seq_Roman_Num_Example', 'tag:h3')</h3>
<button class="exampleButton" onclick="
changeNextElementDisplay(this, this.nextElementSibling);
if (this.innerHTML.indexOf('Run ') > -1) {
this.innerHTML = this.innerHTML.replace('Run', 'Hide');
var ORIGINAL_II_Terms_of_Service_and_Payment_Agreement = document.getElementById('ORIGINAL_II_Terms_of_Service_and_Payment_Agreement');
ORIGINAL_II_Terms_of_Service_and_Payment_Agreement.innerText = document.getElementById('II_Terms_of_Service_and_Payment_Agreement').innerHTML;
sequentialSectionRomanNumeralItems('id', 'Seq_Roman_Num_Example', 'tag:h3');
} else {
this.innerHTML = this.innerHTML.replace('Hide', 'Show');
}
">Run sequentialSectionRomanNumeralItems()</button>
<div id="sequentialSectionRomanNumeralItems" style="display:none">
<br>
<div>
<button onclick="
changeNextElementDisplay(this, this.nextElementSibling);
">Show Original Text</button>
<div id="ORIGINAL_II_Terms_of_Service_and_Payment_Agreement" style="display:none"></div>
</div>
<div id="II_Terms_of_Service_and_Payment_Agreement">
<div id="Seq_Roman_Num_Example">
<h1>
Terms of Service and Payment Agreement
</h1>
<hr>
<h2>
Terms of Service and Payment Agreement between Flint River Fuel Center and Prospective Customer
</h2>
<p>
This Contract for Account Setup ("Contract") is being presented to the Prospective Customer as a Customer on the current day's date, which will be recorded once the form has been successfully submitted.
</p>
<br><br>
<div>
<h3>
Mutuality of Obligation:
</h3>
<ol>
<li>
<strong>Parties:</strong>
<ol>
<li>Company: Flint River Fuel Center, an S Corporation organized under the laws of Georgia, with its principal place of business at 2568 GA-49 Oglethorpe, GA 31068.</li>
<li>Customer: The party agreeing to pay Invoices, an individual/entity or representative for an individual/entity agreeing to the terms and conditions of this Contract.</li>
</ol>
</li>
<li>
<strong>Services:</strong>
<ol>
<li>Company agrees to provide diesel fuel to Customer in accordance with the terms outlined in this Contract.</li>
<li>Customer agrees that they will stay current with weekly invoices received, paying each in a timely manner.</li>
</ol>
</li>
<li>
<strong>Invoicing:</strong>
<ol>
<li>Company agrees to invoice the Customer weekly or for a set period of time, and each invoice shall specify the amount owed by Customer to Company for purchase made during prior week or a set period of time.</li>
<li>Customer agrees to receive weekly invoices from Company for purchases made.</li>
</ol>
</li>
<li>
<strong>Unpaid Amount and Overdue Charges:</strong>
<ol>
<li>Company agrees to provide Customer with prior notice to any charges being brought against them for any outstanding amount that is over 90 days due to the Company by the Customer.</li>
<li>
Customer acknowledges and agrees that any unpaid amount exceeding $500 ("Unpaid Total") shall result in legal action taken by Company.
<ol>
<li>Customer understands that failure to pay the Unpaid Total may result in legal action being brought against them.</li>
</ol>
</li>
</ol>
</li>
<li>
<strong>Credit Limit:</strong>
<ol>
<li>Company will set a Credit Limit for the Customer that will be determined by the Customer paying each Invoice amount in a timely manner.</li>
<li>Customer agrees that once the Unpaid Total reaches the credit limit specified by Company, Customer's account may be suspended until payment is made.</li>
</ol>
</li>
<li>
<strong>Legal Responsibility:</strong>
<ol>
<li>
Company is aware they are legally responsible to provide the Customer with updated and accurate information regarding the Customer's Invoice and any Overdue Amount, Unpaid Total, and Time Periods stating the sum of Unpaid Invoices for the corresponding Time Range.
</li>
<li>Customer acknowledges that they are legally responsible for the Unpaid Total and any associated charges, including but not limited to interest, legal fees, and penalties.</li>
</ol>
</li>
<li>
<strong>Termination:</strong>
<ol>
<li>Either party (Company or Customer) may terminate this Contract upon notice to the other party if the terms outlined herein are violated.</li>
</ol>
</li>
<li>
<strong>Governing Law:</strong>
<ol>
<li>This Contract shall be governed by and construed in accordance with the laws of Georgia.</li>
</ol>
</li>
<li>
<strong>Entire Agreement:</strong>
<ol>
<li>This Contract constitutes the entire agreement between Company and Customer and supersedes any prior agreements or understandings, whether written or oral.</li>
</ol>
</li>
<li>
<strong>Agreements, Digital Acknowledgement, and Digital Signature:</strong>
<ol>
<li>Company agrees to the terms of this contract by providing this contract to the Customer.</li>
<li>Prospective Customer's digital acknowledgement and digital signature holds them accountable as the Customer of this contract after it has been submitted, processed, and approved by the Company.
<ol class="dashList">
<li>
By digitally acknowledging and signing this contract the Prospective Customer declares they have read, understand, and agree to be bound by the terms and conditions of this Contract as defined for the Customer layed out for a Prospective Customer.
</li>
</ol>
</li>
</ol>
</li>
</ol>
</div>
<br>
<div>
<h3>
Terms of Service and Payment:
</h3>
<ol>
<li>
<strong>Parties:</strong>
<p>This agreement is made between Flint River Fuel Center, located at 2568 GA-49 Oglethorpe, GA 31068, and Prospective Customer who, once acknowledging and accepting the terms of the contract becomes a Customer as defined in contract; collectively referred to as the "Parties".</p>
</li>
<li>
<strong>Invoice:</strong>
<p>
The Company shall issue weekly invoices to the Customer for purchases made. Each invoice shall detail the amount owed by the Customer and will be accompanied by a statement that will include Time Periods, Unpaid Invoices, and the Unpaid Total.
</p>
</li>
<li>
<strong>Statement and Overdue Amount:</strong>
<p>
The Company shall provide a weekly Statement to the Customer, detailing the total Unpaid Amounts and Unpaid Total. The Unpaid Total shall include all outstanding Invoices. Overdue Amounts shall be categorized based on the Time Range as specified in Section 4.
</p>
</li>
<li>
<strong>Time Ranges and Overdue Amounts:</strong>
<p>The Overdue Amounts shall be categorized into the following time ranges:</p>
<ol class="dashList">
<li>1 to 30 days</li>
<li>31 to 60 days</li>
<li>61 to 90 days</li>
<li>Over 90 days</li>
</ol>
</li>
<li>
<strong>Credit Limit and Max Amount:</strong>
<p>
The Credit Limit will start at $500 and if an unpaid amount of $500 or more is due in the Over 90 days Time Range, the Customer may be legally prosecuted, while at any amount below $500 the Customer is legally liable for the amount owed in the Over 90 days Time Range category. If the Unpaid Total exceeds the Credit Limit, the Customer shall be unable to make additional purchases until the balance is settled. The Max Amount for each time range shall be specified by the Company.
</p>
</li>
<li>
<strong>Legal Responsibility:</strong>
<p>
The Customer acknowledges that they are legally responsible for any Unpaid Total exceeding $500. Failure to settle the Unpaid Total within the specified time frame may result in legal action by the Company. This includes legal action being brought against the customer.
</p>
</li>
<li>
<strong>Legal Action:</strong>
<p>
The Customer understands that the Company reserves the right to pursue legal action against them for any Unpaid Total equal to or greater than $500 that is over 90 days due, and any Unpaid Total that is greater than $5,000. The Customer shall be notified of impending legal action before charges are filed.
</p>
</li>
<li>
<strong>Agreement Acknowledgement:</strong>
<p>
By signing this agreement, the Customer acknowledges that they have read, understood, and agreed to the terms outlined herein; therefore accepting all terms and obligations of this contract as defined for the Customer and Prospective Customer.
</p>
</li>
</ol>
</div>
</div>
</div>
</div>
</span>
<hr>
</div>
<h4>Changing Elements Examples:</h4><hr>
<button class="showSectioBtn" onclick="changeNextElementDisplay(this, this.nextElementSibling)">Show Changing Examples</button><br>
<div style="display:none">
<!-- change to uppercase -->
<span>
<p><strong>changeToUpperCase(upperCaseVar)</strong><br>
var upperCaseVar = "change to uppercase."
</p>
<button onclick="toggleButtonSwitch(this);
if (this.dataset.togglebuttonswitch == 1) { this.innerHTML = this.innerHTML.replace('Run', 'Reset'); }
if (this.dataset.togglebuttonswitch == 0) { this.innerHTML = this.innerHTML.replace('Reset', 'Run'); }
"
data-togglebuttonswitch="0"
data-toggle-X="(
function() {
var upperCaseVar = 'change to uppercase.';
document.getElementById('changeToUpperCaseEx').innerHTML = changeToUpperCase(upperCaseVar);
}
) ()"
data-toggle-y="document.getElementById('changeToUpperCaseEx').innerHTML = document.getElementById('resetchangeToUpperCase').innerHTML">Run changeToUpperCase() Function</button><br>
<div id="resetchangeToUpperCase" style="display:none">
</div>
<div id="changeToUpperCaseEx">
</div><br>
</span>
<!-- change to lowercase -->
<span>
<p><strong>changeToLowerCase(upperCaseVar)</strong><br>
var lowerCaseVar = "CHANGE TO LOWERCASE."
</p>
<button onclick="toggleButtonSwitch(this);
if (this.dataset.togglebuttonswitch == 1) { this.innerHTML = this.innerHTML.replace('Run', 'Reset'); }
if (this.dataset.togglebuttonswitch == 0) { this.innerHTML = this.innerHTML.replace('Reset', 'Run'); }
"
data-togglebuttonswitch="0"
data-toggle-X="(
function() {
var lowerCaseVar = 'CHANGE TO LOWERCASE.';
document.getElementById('changeToLowerCaseEx').innerHTML = changeToLowerCase(lowerCaseVar);
}
) ()"
data-toggle-y="document.getElementById('changeToLowerCaseEx').innerHTML = document.getElementById('resetchangeToLowerCase').innerHTML">Run changeToLowerCase() Function</button><br>
<div id="resetchangeToLowerCase" style="display:none">
</div>
<div id="changeToLowerCaseEx">
</div><br>
</span>
<!-- change to table I -->