blob: 1637da249eac07d527956d73b97f1e8bd358145a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
$(function () {
const CookieInput = $(".CookieInput");
let NetflixJson;
CookieInput.keyup(function (e) {
if (e.keyCode === 13) {
$.ajax({
url: "assets/php/getJson.php",
data: {"Cookie": CookieInput.val()},
type: "POST",
}).done(function (answer) {
/**
* Example response:
* bookmark: 0
* country: "DE"
* date: 1529338765489
* dateStr: "18.06.18"
* deviceType: 1481
* duration: 3302
* episodeTitle: "Folge 13"
* estRating: "50"
* index: 0
* movieID: 80205354
* seasonDescriptor: "Teil 1"
* series: 80192098
* seriesTitle: "Haus des Geldes"
* title: "Teil 1: \"Folge 13\""
* topNodeId: "80192098"
* videoTitle: "Folge 13"
*/
NetflixJson = JSON.parse(answer);
console.log(NetflixJson);
let IndividualTitles = [];
NetflixJson.viewedItems.forEach(function(item, key) {
const CurrentTitle = NetflixJson.viewedItems[key].seriesTitle;
if (!(CurrentTitle in IndividualTitles)) {
IndividualTitles.push(CurrentTitle);
}
});
console.table(IndividualTitles);
});
CookieInput.val("");
}
});
});
|