diff --git a/index.php b/index.php index c55ec36..9dcbb5b 100644 --- a/index.php +++ b/index.php @@ -122,8 +122,7 @@ function uri($uri) { - - + diff --git a/resources/js/getQueryVariable.js b/resources/js/getQueryVariable.js deleted file mode 100644 index e765be3..0000000 --- a/resources/js/getQueryVariable.js +++ /dev/null @@ -1,12 +0,0 @@ -function getQueryVariable(variable) { - // alert('getQueryVariable called'); - var query = window.location.search.substring(1); - var vars = query.split("&"); - for (var i=0;i parseInt(num, 10)); + const v2 = version2.split('.').map(num => parseInt(num, 10)); + + // Compare each part + const length = Math.max(v1.length, v2.length); + for (let i = 0; i < length; i++) { + const val1 = v1[i] || 0; // If version 1 has fewer parts, treat as 0 + const val2 = v2[i] || 0; // If version 2 has fewer parts, treat as 0 + + if (val1 < val2) return -1; + if (val1 > val2) return 1; + } + + return 0; // Versions are equal +} + +function slugify (str) { + str = str.replace(/^\s+|\s+$/g, ''); + str = str.toLowerCase(); + var from = "àáãäâèéëêìíïîòóöôùúüûñšç·/_,:;"; + var to = "aaaaaeeeeiiiioooouuuunsc------"; + for (var i=0, l=from.length ; i