Skip to content

Commit

Permalink
Convert xlecx Links To new System
Browse files Browse the repository at this point in the history
  • Loading branch information
RealLowMaster committed Feb 5, 2022
1 parent 5ab9929 commit f72a2d6
Show file tree
Hide file tree
Showing 8 changed files with 135 additions and 439 deletions.
2 changes: 1 addition & 1 deletion CSS/xlecx.css
Original file line number Diff line number Diff line change
Expand Up @@ -323,5 +323,5 @@
color: #fff;
}

.xlecx-pagination > button[disable="true"] { background-color: #d20068 }
.xlecx-pagination > button:disabled { background-color: #d20068 }
.xlecx-pagination > button:hover { background-color: #d20068 }
1 change: 1 addition & 0 deletions JS/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ function error(txt, onclick) {
const element = document.createElement('div')
element.classList.add('action-error')

console.error(err)
let html = `<div></div><div><p>${err}</p>`
if (onclick == null) html += `<button class="btn btn-danger" onclick="this.parentElement.parentElement.remove()">OK</button></div></div>`
else html += `<button onclick="${onclick}">OK</button></div>`
Expand Down
14 changes: 7 additions & 7 deletions JS/apis/xlecx-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ class XlecxAPI {
}

// Pagination
arr.pagination = []
if (pagination == true) {
arr.pagination = [];
li = htmlDoc.getElementById('bottom-nav').querySelector('.navigation').children
for (let i = 0; i < li.length; i++) {
let value, pPage
Expand Down Expand Up @@ -237,8 +237,8 @@ class XlecxAPI {
}

// Pagination
arr.pagination = []
if (pagination == true) {
arr.pagination = []
li = htmlDoc.getElementById('bottom-nav').querySelector('.navigation').children
for (let i = 0; i < li.length; i++) {
let value, pPage
Expand Down Expand Up @@ -550,9 +550,9 @@ class XlecxAPI {
// Pagination
if (pagination == true) {
li = htmlDoc.getElementById('bottom-nav') || null
arr.pagination = []
if (li != null) {
li = li.querySelector('.navigation').children || null
arr.pagination = []
for (let i = 0; i < li.length; i++) {
let value, pPage
if (li[i].textContent == "") {
Expand Down Expand Up @@ -637,9 +637,9 @@ class XlecxAPI {
// Pagination
if (pagination == true) {
li = htmlDoc.getElementById('bottom-nav') || null
arr.pagination = []
if (li != null) {
li = li.querySelector('.navigation').children || null
arr.pagination = []
for (let i = 0; i < li.length; i++) {
let value, pPage
if (li[i].textContent == "") {
Expand Down Expand Up @@ -724,9 +724,9 @@ class XlecxAPI {
// Pagination
if (pagination == true) {
li = htmlDoc.getElementById('bottom-nav') || null
arr.pagination = []
if (li != null) {
li = li.querySelector('.navigation').children || null
arr.pagination = []
for (let i = 0; i < li.length; i++) {
let value, pPage
if (li[i].textContent == "") {
Expand Down Expand Up @@ -811,9 +811,9 @@ class XlecxAPI {
// Pagination
if (pagination == true) {
li = htmlDoc.getElementById('bottom-nav') || null
arr.pagination = []
if (li != null) {
li = li.querySelector('.navigation').children || null
arr.pagination = []
for (let i = 0; i < li.length; i++) {
let value, pPage
if (li[i].textContent == "") {
Expand Down Expand Up @@ -904,8 +904,8 @@ class XlecxAPI {
// Pagination
if (pagination == true) {
li = htmlDoc.getElementById('bottom-nav') || null
arr.pagination = []
if (li != null) {
arr.pagination = []
li = li.querySelector('.navigation').children
for (let i = 0; i < li.length; i++) {
let value, pPage
Expand Down
1 change: 1 addition & 0 deletions JS/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ function browserError(err, tabIndex) {
tabs[tabIndex].page.innerHTML = `<br><div class="alert alert-danger">${err}</div><button class="btn btn-primary" style="display:block;margin:3px auto" onclick="browserTabReload()">Reload</button>`
tabs[tabIndex].rename('*Error*')
tabs[tabIndex].icon.style.display = 'none'
console.error(err)
}

function searchFilter(txt, database, alert) {
Expand Down
13 changes: 11 additions & 2 deletions JS/classes.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,17 +252,26 @@ class Tab {
xlecxOpenAllTags(newTab)
break
case 1:
xlecxOpenCategory(this.linksValue[index][0], 1, this.linksValue[index][1], newTab)
xlecxOpenCategory(this.linksValue[index][0], this.linksValue[index][1], this.linksValue[index][2], newTab)
break
case 2:
xlecxOpenPost(newTab, this.linksValue[index])
break
case 3:
xlecxChangePage(this.linksValue[index], newTab)
break
case 4:
xlecxOpenTag(this.linksValue[index][0], this.linksValue[index][1], this.linksValue[index][2], newTab)
break
case 5:
xlecxSearch(this.linksValue[index][0], this.linksValue[index][1], newTab)
break
}
} else if (site == 1) {

switch(this.linksIndex[index]) {
case 0:
break
}
}
}

Expand Down
Loading

0 comments on commit f72a2d6

Please sign in to comment.