Skip to content

Commit

Permalink
DebugFunctions
Browse files Browse the repository at this point in the history
Исправления Debug Functions, для обычного пользователя это не нужно.
  • Loading branch information
Murakumo-JP committed Nov 18, 2024
1 parent 2c321c8 commit 4d43125
Showing 1 changed file with 31 additions and 23 deletions.
54 changes: 31 additions & 23 deletions Assets/js/main.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,34 @@
// Debag
// document.addEventListener("DOMContentLoaded", function() {
// const links = document.querySelectorAll('a');
// links.forEach(link => {
// link.addEventListener('click', function(event) {
// event.preventDefault();
// const url = this.getAttribute('href') + '.html';
// window.location.href = url;
// });
// });
// });
// $('tr').each(function() {
// var titleText = [];
// ['db-skill', 'db-role-action', 'db-skill-passive', 'db-role-traits', 'db-skill-pvp'].forEach(attr => {
// var attrValue = $(this).attr(attr);
// if (attrValue) {
// titleText.push(attrValue);
// }
// });
// if (titleText.length > 0) {
// $(this).attr('title', titleText.join(', '));
// }
// });
// Debug
let DebugEnabled = false;

function DebugFunctions() {
if (!DebugEnabled) return;

document.addEventListener("DOMContentLoaded", function () {
const links = document.querySelectorAll('a');
links.forEach(link => {
link.addEventListener('click', function (event) {
event.preventDefault();
const url = this.getAttribute('href') + '.html';
window.location.href = url;
});
});
});

$('tr').each(function () {
var titleText = [];
['db-skill', 'db-role-action', 'db-skill-passive', 'db-role-traits', 'db-skill-pvp'].forEach(attr => {
var attrValue = $(this).attr(attr);
if (attrValue) {
titleText.push(attrValue);
}
});
if (titleText.length > 0) {
$(this).attr('title', titleText.join(', '));
}
});
}
DebugFunctions();
// Doom Load
$(document).ready(function () {
// Info Update
Expand Down

0 comments on commit 4d43125

Please sign in to comment.