Я все время получаю ошибку всякий раз, когда я запускаю код. Если кто-нибудь может объяснить, что не так, или показать мне фиксированную версию? Я был бы очень благодаренОшибка в моем Javascript-коде
Mixed Содержание:
страницы в 'https://www.roblox.com/catalog/' был загружен через HTTPS, но запросил небезопасное XMLHttpRequest конечной точки 'http://c3.rbxcdn.com/4b192cd410398472f25d7aea541a352c'. Этот запрос был заблокирован; содержимое должно быть передано через HTTPS.
Код:
var globeid = 0
var priceUnder = 5000
function check(z){
$.get(z, function(data){
if ($(data).find('#ctl00_cphRoblox_LimitedEditionRemaining').length) {
var check = $(data).find('#BuyWithRobux').children('div').data()
var Token = data.match(/Roblox.XsrfToken.setToken([^)]+)/)[1].match(/[^(']+/)[0]
if (check['expectedPrice'] <= priceUnder) {
$.post('https://www.roblox.com/api/item.ashx?rqtype=purchase&productID=' + check["productId"] + '&expectedCurrency=1&expectedPrice=' + check["expectedPrice"] + '&expectedSellerID=1')
console.log('Purchased: ' + check["itemName"] + " | " + check["itemId"] + " for " + check["expectedPrice"])
}
}
})
}
function checkifnewlim() {
$.get("https://www.roblox.com/asset/?id=261522650").success(function(r) {
r = decodeURIComponent(r);
r = JSON.parse(r.substring(r.indexOf("{"), r.lastIndexOf("}") + 1));
var notifications = r
for (var info in notifications) {
var currid = notifications[info]["id"]
if (currid > globeid) {
console.log("NEW ITEM...")
globeid = currid
notificationpopup(notifications[info])
var nn = notifications[info]
var url = nn.url.split('&')[0]
check(url)
}
}
})
function notificationpopup(n) {
var notification = new Notification(n.lite, {
icon: n.icon,
body: n.header + "\n" + "Price: " + n.items.Price + "\n\n" + "Autobuy: OFF"
});
var url = n.url.split('&')[0]
notification.onclick = function() {
console.log("NOTIFICATION SUCCESS!");
window.open(url);
}
}
}
setInterval(function() {
checkifnewlim()
}, 100)