Skip to content

Commit

Permalink
Merge pull request #2 from User-425/repo
Browse files Browse the repository at this point in the history
Join 2.5.1
  • Loading branch information
User-425 authored Sep 6, 2023
2 parents c0c78fa + 36a81ad commit 5068a89
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 41 deletions.
1 change: 1 addition & 0 deletions assets/js/converter.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const cheater = chooser('theCheatF',all_cheater).module;
const reverse_cheater = chooser('theCheatF',all_cheater).reverse;
const finaller = chooser('undefinedModule',all_cheater).module;


function theUndefiner( str, mapper ) {
str = ( str.split( '' )
.map( a => mapper[ a ] ?? a )
Expand Down
2 changes: 2 additions & 0 deletions assets/js/log.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ log = [

var logOutput = '';

// log templating
var logresult = log.map( function( x ) {
x = x.replace( /;/g, '<br>' );
x = x.replace( /-}/g, '</strong>' );
x = x.replace( /{-/g, '<strong>' )
return x;
} );

// logging with new line
logresult.forEach( function( element ) {
logOutput += element + '\n';
} );
Expand Down
26 changes: 7 additions & 19 deletions assets/js/main.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
ezArabicVersion = "2.5.0 (Github Release)";
legacy_mode = "0";

// Add version to HTML
vrstext = document.getElementById( 'vrs' );
vrstext.innerHTML = "v".concat( ezArabicVersion )

// Auto Scroller
function textScroller( id , scrl) {
if (scrl==true) {
Expand All @@ -14,7 +18,7 @@ $( 'input' )
.css( 'font-size', $( e.target )
.val() + 'px' ) );

//copy
// Copy Function
function copy( id, inVal ) {
var copyText = document.getElementById( id );
if ( inVal == "in" ) {
Expand All @@ -35,6 +39,7 @@ function copy( id, inVal ) {
} );
}

// Table click feature (copy or input)

function press( id, inVal ) {
table_f = document.getElementById( "tablefeature" ).value;
Expand Down Expand Up @@ -174,14 +179,6 @@ function clone( obj ) {
onscroll( document, headerScrolled )
}

function secret( word ) {
if ( word == "sukses selalu!" ) {
alert( "AMINNN!!" )
} else {
alert( "Sandi Salah!" )
}
}

/**
* Back to top button
*/
Expand Down Expand Up @@ -247,13 +244,4 @@ function clone( obj ) {
}
}
} );

/**
* Animation on scroll
*/


} )()

vrstext = document.getElementById( 'vrs' );
vrstext.innerHTML = "v".concat( ezArabicVersion )
} )()
22 changes: 15 additions & 7 deletions assets/js/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,13 +244,6 @@ function sort( data ) {
x.output = x.output.map( ( _, i ) => x.output[ ids[ i ] ] )
}


// function newModule(m, name){
// let n_m = new customModule(name,clone(moduleChooser(m)));
// all_module.push(n_m)
// makeOption(name,'moduleSelect')
// }

// Deconstruct to data
function moduleDeconstruct3( name ) {
let a = [];
Expand Down Expand Up @@ -294,3 +287,18 @@ for ( let i = 0; i < all_module.length; i++ ) {
all_cheater.push( new data( all_module[ i ].name,a , null, null, null, swap(a)) )
}
}

// Function make table
function makeTable( a, e, t, l ) {
var n = "<table class='table table-bordered align-middle'><tr>",
c = l;
a.forEach( ( e, l ) => {
n += l % 2 == 0 ? `<td id="${t}${[l]}" onclick="press('${t}${[l]}','in')">${e}</td>` : `<td id="${t}${[l]}" class="arabCell" onclick="press('${t}${[l]}','in')">${e}</td>`;
var r = l + 1;
r % c == 0 && r != a.length && ( n += "</tr><tr>" )
} ), n += "</tr></table>", document.getElementById( e )
.innerHTML = n;
}

// Run function make table based on module data
makeTable( chooser('Main',all_data).notFlat, "table1", "n_", 4 ), makeTable( chooser('Legacy', all_data).notFlat, "table2", "l_", 4 );
12 changes: 0 additions & 12 deletions assets/js/table.js

This file was deleted.

5 changes: 2 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ <h1 class="logo">
<a class="nav-link scrollto" style="cursor: pointer" data-toggle="modal" data-target="#about">About</a>
</li>
</ul>
<a class="nav-link scrollto" data-toggle="modal" data-target="#about">
<a class="nav-link scrollto" data-toggle="modal" data-target="#">
<i class="bi bi-list mobile-nav-toggle"></i>
</a>
</nav>
Expand Down Expand Up @@ -215,9 +215,8 @@ <h3 class="modal-title">Changelog</h3>
<script src="assets/js/module.js"></script>
<script src="assets/js/converter.js"></script>
<script src="assets/js/keyboard.js"></script>
<script src="assets/js/table.js"></script>
<script src="assets/js/log.js"></script>

</body>

</html>
</html>

0 comments on commit 5068a89

Please sign in to comment.