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

View File

@@ -73,7 +73,7 @@ function updateTopLists() {
}
function add(domain,list) {
var token = $("#token").html();
var token = $("#token").text();
$.ajax({
url: "scripts/pi-hole/php/add.php",
method: "post",

View File

@@ -59,7 +59,7 @@ $(function () {
var tableApi, statistics;
function add(domain,list) {
var token = $("#token").html();
var token = $("#token").text();
var alInfo = $("#alInfo");
var alList = $("#alList");
var alDomain = $("#alDomain");

View File

@@ -31,7 +31,7 @@ function eventsource() {
var ta = $("#output");
var upload = $( "#upload" );
var checked = "";
var token = encodeURIComponent($("#token").html());
var token = encodeURIComponent($("#token").text());
if(upload.prop("checked"))
{

View File

@@ -59,7 +59,7 @@ function countDown(){
function piholeChange(action, duration)
{
var token = encodeURIComponent($("#token").html());
var token = encodeURIComponent($("#token").text());
var enaT = $("#enableTimer");
var btnStatus;

View File

@@ -9,7 +9,7 @@
$.ajaxSetup({cache: false});
// Get PHP info
var token = $("#token").html();
var token = $("#token").text();
var listType = $("#list-type").html();
var fullName = listType === "white" ? "Whitelist" : "Blacklist";

View File

@@ -10,7 +10,7 @@
var tableApi;
function add(domain,list) {
var token = $("#token").html();
var token = $("#token").text();
var alertModal = $("#alertModal");
var alProcessing = alertModal.find(".alProcessing");
var alSuccess = alertModal.find(".alSuccess");