Se a Eliminado de Head los script js para evitar su carga inecesaria cuando no hace falta

This commit is contained in:
adevopg
2025-02-15 17:53:52 +01:00
parent 4b83057131
commit fa8a0e0891
25 changed files with 100 additions and 26 deletions
@@ -14,9 +14,11 @@
<div class="centered">
<br>
<br>
<form id="nw-change-email-form" method="POST" accept-charset="utf-8">
{% csrf_token %}
<table class="middle-center-table">
<script src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-js-handlers/change_email_response.js"></script>
<tr>
<td><input type="password" maxlength="16" name="cur-password" id="cur-password" placeholder="Contraseña actual" required></td>
</tr>
@@ -55,6 +55,8 @@
<p>Por favor, asegúrate de haber escogido al personaje correcto ya que esta acción no es reversible una vez realizada.</p>
</div>
</fieldset>
<script src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-js-handlers/change_faction_response.js"></script>
<script src="https://js.stripe.com/v3/"></script>
<form action="" id="nw-change-faction-form" method="POST" accept-charset="utf-8">
<select name="character">
<option value="" selected disabled>Seleccione un personaje</option>
@@ -15,6 +15,9 @@
<br>
<form action="" method="POST" id="nw-change-password-form" accept-charset="utf-8">
<table class="middle-center-table">
<script
src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-js-handlers/change_password_response.js">
</script>
<tbody><tr>
<td><input type="password" maxlength="16" name="cur-password" id="cur-password" placeholder="Contraseña actual" autofocus="">
<span class="far fa-eye toggle-cur-password"></span></td>
+2
View File
@@ -19,6 +19,8 @@
<p>Por favor, asegúrate de haber escogido al personaje correcto ya que esta acción no es reversible una vez realizada.</p>
</div>
</fieldset>
<script src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-js-handlers/change_race_response.js"></script>
<script src="https://js.stripe.com/v3/"></script>
<form id="nw-change-race-form" div class="centered">
<br>
<br>
@@ -24,6 +24,8 @@
<p>Por favor, asegúrate de haber escogido al personaje correcto ya que esta acción no es reversible una vez realizada.</p>
</div>
</fieldset>
<script src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-js-handlers/customize_response.js"></script>
<script src="https://js.stripe.com/v3/"></script>
<form id="nw-customize-form" div class="centered">
<br>
<br>
@@ -9,6 +9,8 @@
</div>
<div class="body-box-content justified">
<p>Selecciona un personaje y la cantidad de oro:</p>
<script src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-js-handlers/gold_response.js"></script>
<script src="https://js.stripe.com/v3/"></script>
<form id="nw-gold-form">
<select name="character" required>
<option value="" selected disabled>Seleccione un personaje</option>
-23
View File
@@ -41,31 +41,8 @@
<link rel="shortcut icon" href="{{ URL_PRINCIPAL }}/static/favicon.ico" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script src="https://www.google.com/recaptcha/api.js"></script>
<!--
<script src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-js/power.js?lang=es"></script>
<script src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-js/nw-scripts.js"></script>
<script src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-js-handlers/login_response.js"></script>
<script src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-js-handlers/my_account_response.js"></script>
<script src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-js-handlers/recruit-response.js"></script>
<script src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-js-handlers/trade_points_response.js"></script>
<script src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-js-handlers/change_email_response.js"></script>
<script src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-js-handlers/security_token_response.js"></script>
<script src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-js-handlers/change_password_response.js"></script>
<script src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-js-handlers/rename_guild_response.js"></script>
<script src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-js-handlers/vote_points_response.js"></script>
<script src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-js-handlers/unstuck_response.js"></script>
<script src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-js-handlers/revive_response.js"></script>
<script src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-js-handlers/rename_response.js"></script>
<script src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-js-handlers/customize_response.js"></script>
<script src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-js-handlers/change_race_response.js"></script>
<script src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-js-handlers/change_faction_response.js"></script>
<script src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-js-handlers/level_up_response.js"></script>
<script src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-js-handlers/gold_response.js"></script>
<script src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-js-handlers/transfer_character_response.js"></script>
<script src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-js-handlers/store_response.js"></script>
<script src="https://js.stripe.com/v3/"></script>
-->
<script>var aowow_tooltips = { "colorlinks": true, "iconizelinks": true, "renamelinks": true }</script>
+2
View File
@@ -20,6 +20,8 @@
</div>
</fieldset>
<p>Selecciona el personaje que deseas subir al nivel 80:</p>
<script src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-js-handlers/level_up_response.js"></script>
<script src="https://js.stripe.com/v3/"></script>
<form action="" id="nw-levelup-form" method="POST" accept-charset="utf-8">
<select name="character">
<option value="" selected disabled>Seleccione un personaje</option>
+1
View File
@@ -3,6 +3,7 @@
<div class="body-content">
<div class="title-content"><h1>Código de promoción</h1></div>
<div class="box-content">
<script src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-js-handlers/promo_code_response.js"></script>
<div class="title-box-content"><h2>Información</h2><a class="back-to-account" href="my-account">Regresar a mi cuenta</a><a class="back-to-account-responsive" href="my-account">Regresar</a></div>
<div class="body-box-content justified">
<br>
@@ -1,6 +1,7 @@
<div class="main-page">
<div class="middle-content">
<div class="body-content">
<script src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-js-handlers/recruit-response.js"></script>
<div class="title-content"><h1>Recluta a un amigo</h1></div>
@@ -16,6 +16,7 @@
<p>Se puede repetir la acción las veces que quieras.</p>
</div>
</fieldset>
<script src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-js-handlers/rename_response.js"></script>
<form id="nw-rename-form" div class="centered">
<br>
<br>
@@ -16,6 +16,7 @@
<p>Se puede repetir la acción en un mismo las veces que quieras.</p>
</div>
</fieldset>
<script src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-js-handlers/rename_response.js"></script>
<form id="nw-rename-form" div class="centered">
<br>
<br>
@@ -9,6 +9,7 @@
<a class="back-to-account-responsive" href="my-account">Regresar</a>
</div>
<div class="body-box-content justified">
<script src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-js-handlers/rename_guild_response.js"></script>
<br>
<p>La herramienta <span>Renombrar hermandad</span> te permite cambiar de nombre a una hermandad de la cual seas Maestro de Hermandad.</p>
<br>
@@ -15,6 +15,7 @@
{% if characters %}
<p>Escoge el personaje que quieres revivir:</p>
<br>
<script src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-js-handlers/revive_response.js"></script>
<form id="nw-revive-form" action="" method="POST" accept-charset="utf-8">
{% csrf_token %}
<select name="character">
@@ -3,6 +3,7 @@
<div class="body-content">
<div class="title-content"><h1>Token de seguridad</h1></div>
<div class="box-content">
<script src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-js-handlers/security_token_response.js"></script>
<div class="title-box-content"><h2>Información</h2><a class="back-to-account" href="my-account">Regresar a mi cuenta</a><a class="back-to-account-responsive" href="my-account">Regresar</a></div>
<div class="body-box-content justified">
<br>
@@ -27,6 +27,8 @@
{% endfor %}
</ul>
<p>Total: {{ total_price }} €</p>
<script src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-js-handlers/store_response.js"></script>
<script src="https://js.stripe.com/v3/"></script>
<button id="checkout-button">Pagar</button>
</div>
</div>
@@ -52,6 +52,8 @@
<div class="centered">
<br>
<br>
<script src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-js-handlers/trade_points_response.js"></script>
<script src="https://js.stripe.com/v3/"></script>
<button id="trade-sell-a" class="trade-option-button">VENTA</button>
<button id="trade-buy-a" class="trade-option-button">COMPRA</button>
<br>
@@ -8,6 +8,8 @@
<a class="back-to-account" href="{% url 'my-account' %}">Regresar a mi cuenta</a>
</div>
<div class="body-box-content justified">
<script src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-js-handlers/transfer_character_response.js"></script>
<script src="https://js.stripe.com/v3/"></script>
<form id="nw-transfer-character-form">
<select name="character" required>
<option value="" selected disabled>Seleccione un personaje</option>
@@ -22,6 +22,7 @@
</fieldset>
<div class="centered">
<p>Escoge el personaje que quieres desbloquear</p>
<script src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-js-handlers/unstuck_response.js"></script>
<form id="nw-unstuck-form" method="POST" accept-charset="utf-8">
{% csrf_token %}
<select name="character" required>
+1
View File
@@ -48,6 +48,7 @@
<div class="box-content">
<div class="title-box-content"><h2>Sitios de votación</h2></div>
<script src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-js-handlers/vote_points_response.js"></script>
<div class="body-box-content centered" id="vote-panel">
<button class="refresh-button" onclick="doRefresh();"><img class="refresh-icon" src="{{ URL_PRINCIPAL }}/static/nw-themes/nw-ryu/nw-images/nw-icons/refresh.webp" title="Refrescar" alt="Refrescar"></button>
<p><span>Nota:</span> Gtop100 puede demorar unos minutos en acreditar el voto.</p>
@@ -4,7 +4,7 @@ if (window.history.replaceState) {
function doRefresh() {
$("#nw-change-race-form").load(document.URL + " #nw-change-race-form>*", function () {
$.getScript('nw-js-handlers/change_race_response.js');
$.getScript('/static/nw-themes/nw-ryu/nw-js-handlers/change_race_response.js');
});
}
@@ -0,0 +1,59 @@
if (window.history.replaceState) {
window.history.replaceState(null, null, window.location.href);
};
$(function(){
$('.promo-code').on("cut copy paste",function(e) {
e.preventDefault();
});
});
$(function(){
$('.promo-code-button').on('click', function(e) {
e.preventDefault();
e.stopPropagation();
$("#promo-code-response").empty();
var button = $(this);
var buttonoriginal = button.html();
var bValue = button.data('id');
var data = {promocode: bValue};
data = $("#uw-promo-code-form").serialize() + '&' + $.param(data);
changeButton(button, 'Canjeando código');
$.ajax({
type: 'POST',
url: '',
data: data,
dataType: 'json',
success: function(data) {
$("#promo-code-response").append(data.message).hide().slideDown();
if (data.success === true) {
button.html("Código aceptado");
button.css("color","#d79602");
setTimeout(function() {
$("#uw-promo-code-form")[0].reset();
restoreButton(button, buttonoriginal);
}, 5000);
}
else {
setTimeout(function() {
$("#promo-code-response").slideUp( function() {
$("#promo-code-response").empty();
restoreButton(button, buttonoriginal);
grecaptcha.reset();
});
}, 5000);
}
},
error: function() {
setTimeout(function() {
alert("Algo ha salido mal. Por favor intente más tarde");
window.location.reload();
}, 2000);
}
});
});
});
@@ -12,7 +12,7 @@ $(function(){
function doRefresh() {
$("#nw-rename-guild-form").load(document.URL + " #nw-rename-guild-form>*", function(){
$.getScript('nw-js-handlers/rename_guild_response.js');
$.getScript('/static/nw-themes/nw-ryu/nw-js-handlers/rename_guild_response.js');
});
}
@@ -1,3 +1,9 @@
function doRefresh() {
$("#vote-panel").load(document.URL + " #vote-panel>*", function(){
$.getScript('/static/nw-themes/nw-ryu/nw-js-handlers/vote_points_response.js');
});
}
$(document).ready(function() {
$('.vote-button').each(function() {
var button = $(this);
@@ -59,6 +65,8 @@ $(document).ready(function() {
});
});
function startCooldownTimer(button, remainingTime) {
var interval = setInterval(function() {
if (remainingTime <= 0) {
+1 -1
View File
@@ -15,6 +15,6 @@
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"start_url": "https://novawow.com/es/",
"start_url": "https://www.novawow.com/es/",
"display": "standalone"
}