Merge pull request #1091 from pi-hole/text

Use `text()` for the token
This commit is contained in:
DL6ER
2019-12-17 15:49:05 +01:00
committed by GitHub
6 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ function updateTopLists() {
} }
function add(domain,list) { function add(domain,list) {
var token = $("#token").html(); var token = $("#token").text();
$.ajax({ $.ajax({
url: "scripts/pi-hole/php/add.php", url: "scripts/pi-hole/php/add.php",
method: "post", method: "post",
+1 -1
View File
@@ -59,7 +59,7 @@ $(function () {
var tableApi, statistics; var tableApi, statistics;
function add(domain,list) { function add(domain,list) {
var token = $("#token").html(); var token = $("#token").text();
var alInfo = $("#alInfo"); var alInfo = $("#alInfo");
var alList = $("#alList"); var alList = $("#alList");
var alDomain = $("#alDomain"); var alDomain = $("#alDomain");
+1 -1
View File
@@ -31,7 +31,7 @@ function eventsource() {
var ta = $("#output"); var ta = $("#output");
var upload = $( "#upload" ); var upload = $( "#upload" );
var checked = ""; var checked = "";
var token = encodeURIComponent($("#token").html()); var token = encodeURIComponent($("#token").text());
if(upload.prop("checked")) if(upload.prop("checked"))
{ {
+1 -1
View File
@@ -59,7 +59,7 @@ function countDown(){
function piholeChange(action, duration) function piholeChange(action, duration)
{ {
var token = encodeURIComponent($("#token").html()); var token = encodeURIComponent($("#token").text());
var enaT = $("#enableTimer"); var enaT = $("#enableTimer");
var btnStatus; var btnStatus;
+1 -1
View File
@@ -9,7 +9,7 @@
$.ajaxSetup({cache: false}); $.ajaxSetup({cache: false});
// Get PHP info // Get PHP info
var token = $("#token").html(); var token = $("#token").text();
var listType = $("#list-type").html(); var listType = $("#list-type").html();
var fullName = listType === "white" ? "Whitelist" : "Blacklist"; var fullName = listType === "white" ? "Whitelist" : "Blacklist";
+1 -1
View File
@@ -10,7 +10,7 @@
var tableApi; var tableApi;
function add(domain,list) { function add(domain,list) {
var token = $("#token").html(); var token = $("#token").text();
var alertModal = $("#alertModal"); var alertModal = $("#alertModal");
var alProcessing = alertModal.find(".alProcessing"); var alProcessing = alertModal.find(".alProcessing");
var alSuccess = alertModal.find(".alSuccess"); var alSuccess = alertModal.find(".alSuccess");