// ==UserScript==
// @name Netzflix view
// @description declutters netzkino.de
// @namespace Violentmonkey Scripts
// @match https://www.netzkino.de/
// @match https://www.netzkino.de/category/*
// @grant none
// @version 0.0.1.20240610175029
// ==/UserScript==
// adjust this to your needs:
// 2-3: default, for smaller resolutions
// 4 and 5: 1920x1080/full screen
// 6: ...
var columns = 5;
//
$ = function(_) {return document.getElementById(_)}
$tn = function(_) {return document.getElementsByTagName(_)}
$cn = function(_) {return document.getElementsByClassName(_)}
$qa = function(_) {return document.querySelectorAll(_)}
$qs = function(_) {return document.querySelector(_)}
$tn("body")[0].style.display = "none";
$tn("body")[0].style.visibility = "hidden";
window.addEventListener('DOMContentLoaded',
function() {
var scriptname = "Netzflix view";
$tn("body")[0].onclick = function() {
var nfsvg = '<span><svg height="32" width="128" viewBox="0 0 512 128"><path d="m17.4 9.4v100.8c10.9-3.1 22.5-6 34.7-8.6 0-.1.1-.2.3-.4.4-.4 1-.4 1.2-.4.3.1.4.1.5.2s.2.1.3.2c52.9-11.1 117.4-17.6 187-17.6 23.4 0 46.2.7 68.1 2.1.3-4.2.1-8.7.5-13 0-.1-.1-.1.1-.4.3-.9.8-1 1.2-1 2.9-.2 6.9-1 9.3.6 1.6 4.7-.4 9.8 1.5 14.7 48.5 3.7 92.7 10.6 129.9 20 0-.1.1-.1.1-.2.1-.1.1-.2.3-.3.1-.1.3-.3 1-.3.6 0 .8.2 1 .4.2.1.3.3.4.4.2.2.4.5.5.8 15.2 4 29.2 8.3 41.7 13l-27-60.2 23-46.9-4-3.9h-35.1c-.1.3-.2.4-.3.7-.5 1-.9 1.8-1.2 2.3-.2.3-.3.6-.6.8-.2.2-.4.6-1.3.6-.5 0-.6-.1-.7-.1-.1-.1-.2-.2-.2-.2-.2-.1-.3-.2-.4-.3-.3-.3-.7-.6-1.1-.9-.8-.8-1.9-1.8-3-2.9h-65.7c-.1.5-.1 1.1-.2 1.9-.2 3.5-.2 10.5-.2 25.5-.1 11.1-.1 17.8-.2 21.8v4.1c-.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-13.3 17.7-3.8 5.2-5.4 7.4-6.6 9-3.6 4.6-6.8 9-7.5 10.1l-.8 1.3v5.3c0 3.3.1 5.3.3 5.4.4.1 11.2-.1 20.2-.3zm-71-16.3c.1-5.2.1-11.2 0-13.5-.1-3.8-.2-4.1-.6-4.1s-.4.4-.5 9.1c-.1 10-.3 11.8-1.5 13.4-.7 1-.6 1.7.3 2.6.4.4.9 1 1.3 1.4.3.3.6.6.7.5.1 0 .3-4.3.3-9.4zm264.4-3.1c.9-1.7 1.9-3.5 2.2-4l.5-1.1-1-2c-.6-1.1-1.5-3-2.1-4.3-1.2-2.7-1.4-3-1.8-2.5-.2.4-.2 16.4 0 16.9.3.4.7-.2 2.2-3zm-219 .9c1.1-1.6 7.4-10.1 9.5-12.9 1.1-1.4 2.2-2.9 2.4-3.3.5-.8.5-.8.1-1-.3-.1-1.3 0-2.2.1-1 .2-3.8.4-6.3.5-4.4.2-4.4.2-4.7.8-.1.3-.2 4.2-.2 8.7 0 8.9 0 9.1 1.4 7.1zm61.6-5.7c0-.7-.2-.8-.8-.6-.4.3-.6 1-.3 1.4.3.2 1.1-.4 1.1-.8z" fill="#000100"/><path d="m370-96.6h2.1v.4h-2.1z" fill="#800000"/></svg></span>';
var favicon = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='16' width='16'%3E%3Crect fill='%237f0000' height='14' ry='1' stroke='%23fff' stroke-width='.2' width='14' x='1' y='1'/%3E%3Cpath d='m9.2 10.8h-1.2v-4.4c-.4.4-.9.7-1.5.9v-1c.3-.1.6-.3 1-.6s.6-.6.7-1h1z' fill='%23fff' stroke='%23000' stroke-width='.2'/%3E%3Cpath d='m13.5 8c0 3-2.5 5.5-5.5 5.5s-5.5-2.5-5.5-5.5 2.5-5.5 5.5-5.5 5.5 2.5 5.5 5.5z' fill='none' stroke='%237f7f7f' stroke-width='.3'/%3E%3C/svg%3E";
var imdbsvg = '<span><svg height="20" width="32" viewBox="0 5 64 16"><rect fill="#f5c518" height="32" rx="4" width="64"/><path d="m8 7v18h5v-18zm7 0v18h4.25v-11.875l1.78125 11.875h3.03125l1.6875-12.15625.03125 12.15625h4.21875v-18h-6.3125l-1.125 8.40625-.71875-4.5625c-.2015908-1.46493163-.3773656-2.75199879-.5625-3.84375zm17 0v18h7.8125c1.7671031 0 3.1875-1.43311 3.1875-3.1875v-11.625c0-1.75666009-1.4227064-3.1875-3.1875-3.1875zm13 0v17.78125h4.46875l.3125-1.125c.5884049.8053879 1.5578038 1.34375 2.65625 1.34375h.3125c1.7956636 0 3.25-1.3919253 3.25-3.125v-7.21875c0-1.73219176-1.4548082-3.15625-3.25-3.15625h-.3125c-1.0747565 0-2.0380781.51087183-2.65625 1.28125v-5.78125zm-8.3125 3.09375c.5518634 0 .957924.04905988 1.15625.15625.2026373.10719012.3189514.26973974.375.5s.09375.74864909.09375 1.5625v6.96875c0 1.1989413-.0818541 1.9487897-.25 2.21875-.1681459.2739303-.6463678.40625-1.375.40625zm13.84375 4.1875c.2639059 0 .6557478.1308602.75.34375.0942522.21288983.125.70151132.125 1.40625v4.25c0 .8038426-.0420582 1.3220307-.125 1.53125-.0829419.2092193-.4785537.3125-.75.3125-.2714464 0-.6595179-.1069512-.75-.3125v-1.40625-4.375-1.4375c.0791718-.18719623.4860938-.3125.75-.3125z"/></svg></span>',
imdbprefix = '<a href="https://www.imdb.com/find/?q=',
imdbsuffix = '" target="somenewwindow">' + imdbsvg + '</a> ';
var free = 0;
var exclude = new Array();
var debug = 1;
var mediathek, mode = "";
if (debug != 1) {
console.log = function() {};
console.warn = function() {};
console.err = function() {};
}
var jsoncontainer = 0;
for (var i = 0, l = $tn("script").length; i < l; ++i) {
if ($tn("script")[i].type == "application/ld+json") {
jsoncontainer = i;
break;
}
}
var scriptEl = $tn("script")[jsoncontainer];
var schemaObj = JSON.parse(scriptEl.innerHTML);
function writetable(preparing) {
var allrows = "";
for (var i = 0, l = prepared.length; i < l; ++i) {
free++;
var link = '<a href="' + preparing[i].link + '">';
var plusstate, directordisplay, durationdisplay, releaseyear = "";
if (preparing[i].plusorwhat == "plus") {
plusstate = " [+] ";
}
if (preparing[i].director != "-") {
directordisplay = preparing[i].director;
}
if (preparing[i].relyear != 0) {
releaseyear = preparing[i].relyear + ", ";
}
if (preparing[i].runtime != "0") {
durationdisplay = preparing[i].runtime + " Min., ";
}
if ( preparing[i].fulltitle.indexOf(" (Dt.") != -1) {
var filmtitle = preparing[i].fulltitle.split(" (Dt.")
var origtitle = filmtitle[0];
var displaytitle = preparing[i].fulltitle.replace(" (Dt.: ", "</a><br />(");
var imdbtitle = origtitle;
} else {
var origtitle = "";
var displaytitle = preparing[i].fulltitle;
var imdbtitle = displaytitle;
}
var imdb = imdbprefix + imdbtitle + imdbsuffix;
allrows += '<div>' + link + '<img src="' + preparing[i].img + '" /></a><br />' + link + displaytitle + "</a> " + "<br />" + imdb + releaseyear + durationdisplay + directordisplay + '<br /></div>' + "\n";
}
return allrows;
}
if (debug != 0) {
var skip = 0;
}
var scriptEl = $("__NEXT_DATA__");
var schemaObj = JSON.parse(scriptEl.innerHTML);
var allkeys = Object.values(schemaObj.props["apolloState"]).length;
var preparing = new Array();
var myindex = 0;
function film(fulltitle, link, img, runtime, relyear, director, plusorwhat) {
this.fulltitle = fulltitle;
this.link = link;
this.img = img;
this.runtime = runtime;
this.relyear = relyear;
this.director = director;
this.plusorwhat = plusorwhat;
}
for (var i = 0, l = allkeys; i < l; ++i) {
if (Object.values(schemaObj.props["apolloState"])[i].__typename == "CmsMovie") {
if (Object.values(schemaObj.props["apolloState"])[i].externalIdentifier) {
var slug = Object.values(schemaObj.props["apolloState"])[i].slug;
if (slug) {
var director, plusorwhat = "";
var dttitle = Object.values(schemaObj.props["apolloState"])[i].title.replace(/\u2013|\u2014/g, "-");
var origtitle = slug.replace(/-/g, " ").replace(/(^\w{1})|(\s+\w{1})/g, letter => letter.toUpperCase());
var checkorigtitle = origtitle.toLowerCase();
var checkdttitle = dttitle.toLowerCase();
var myregex = new RegExp(" – .*", "gi");
checkdttitle = checkdttitle.replace(myregex, "");
checkorigtitle = checkorigtitle.replace(myregex, "");
myregex = new RegExp(" - .*", "gi");
checkdttitle = checkdttitle.replace(myregex, "");
checkorigtitle = checkorigtitle.replace(myregex, "");
myregex = new RegExp(": .*", "gi");
checkdttitle = checkdttitle.replace(myregex, "");
checkorigtitle = checkorigtitle.replace(myregex, "");
checkdttitle = checkdttitle
.replace(/-/g, " ")
.replace(/ /g, " ")
.replace(/ä/g, "a")
.replace(/ü/g, "u")
.replace(/ö/g, "o")
.replace(/ß/g, "ss")
.replace(/é/g, "e")
.replace(/ñ/g, "n")
.replace(/the | uncut| hd| 3d|\!|\&|\.|\,|\:|\;|\'|\"/g, "");
checkorigtitle = checkorigtitle
.replace(/-/g, " ")
.replace(/ /g, " ")
.replace(/ä/g, "a")
.replace(/ü/g, "u")
.replace(/ö/g, "o")
.replace(/ß/g, "ss")
.replace(/é/g, "e")
.replace(/ñ/g, "n")
.replace(/the | uncut| hd| 3d|\!|\&|\.|\,|\:|\;|\'|\"/g, "");
var fulltitle, temptitle = "";
if (checkdttitle == checkorigtitle) {
if (dttitle.indexOf(" - ") == -1) {
fulltitle = dttitle;
} else {
fulltitle = origtitle;
}
} else {
if (dttitle.indexOf(" - ") != -1) {
temptitle = dttitle.split(" - ");
fulltitle = temptitle[0];
console.log(fulltitle)
} else
if (dttitle.indexOf(": ") != -1) {
temptitle = dttitle.split(": ");
fulltitle = temptitle[0];
console.log(fulltitle)
} else {
fulltitle = origtitle + " (Dt.: " + dttitle + ")";
}
}
var id = Object.values(schemaObj.props["apolloState"])[i].id;
var runtimeInSeconds = Object.values(schemaObj.props["apolloState"])[i].runtimeInSeconds;
if (runtimeInSeconds < 3600) {
runtimeInSeconds = runtimeInSeconds + 3600;
}
runtimeInSeconds = Math.floor(runtimeInSeconds / 60);
if (runtimeInSeconds == null) {
runtimeInSeconds = 3600;
}
var productionYear = Object.values(schemaObj.props["apolloState"])[i].productionYear;
if (productionYear == null) {
productionYear = 0;
}
var widescreen = schemaObj.props["apolloState"]['$CmsMovie:' + id + '.widescreenImage'].masterUrl;
var howmany = 0;
var justtestin = Object.values(schemaObj.props["apolloState"])[i].flags.json.map((word) => {
if (word.indexOf("plus-exclusive") != -1) {
howmany++;
}
});
if (howmany > 0) {
plusorwhat = "plus";
} else {
plusorwhat = "minus";
}
if (schemaObj.props["apolloState"]['$CmsMovie:' + id + '.cmsMovieContentPeopleByContentMovieId({\"condition\":{\"connectionType\":\"director\"}}).nodes.0.person']) {
director = schemaObj.props["apolloState"]['$CmsMovie:' + id + '.cmsMovieContentPeopleByContentMovieId({\"condition\":{\"connectionType\":\"director\"}}).nodes.0.person'].name;
}
if ((director == "") || (director == "undefined") || (director == "N/A")) {
director = "-";
}
preparing[myindex] = new film(fulltitle, "https://www.netzkino.de/filme/" + slug, widescreen, runtimeInSeconds, productionYear, director, plusorwhat);
myindex++;
}
}
}
}
prepared = preparing;
var screenwidth = window.innerWidth;
var imgsize = Math.floor(screenwidth / 3 - 250);
var cssimg = imgsize.toString();
var padcss = Math.floor(imgsize / 3).toString();
var marcss = Math.floor(imgsize).toString();
var mediathek, dvdx, colcount = "";
var dvdr = '<div class="box"></div>\n';
if (columns == 6) {
colcount = "16% 16% 16% 16% 16% 16";
dvdx = dvdr;
} else if (columns == 5) {
colcount = "19% 19% 19% 19% 19";
dvdx = dvdr;
} else if (columns == 4) {
colcount = "25% 25% 25% 25";
dvdx = dvdr;
} else {
colcount = "33% 33% 33";
}
var genres = 'Genres: ';
var categories = 'Kategorien: ';
var mdash = " • ";
var genresArr = new Array();
var categoriesArr = new Array();
for (var i = 0, l = $cn("r-m611by").length; i < l; ++i) {
genresArr[i] = '<a href="' + $cn("r-m611by")[i].href + '">' + $cn("r-m611by")[i].getAttribute("aria-label").replace("kino","") + '</a> ';
}
for (var i = 0, l = $cn("r-157gdtw").length; i < l; ++i) {
categoriesArr[i] = '<a href="' + $cn("r-157gdtw")[i].getElementsByTagName("a")[0].href + '">' + $cn("r-157gdtw")[i].getElementsByTagName("h1")[0].innerText.replace("kino","").replace("Neu bei Netz","Neuheiten") + '</a> ';
}
categoriesArr = categoriesArr.sort();
genresArr = genresArr.sort();
for (var i = 0, l = categoriesArr.length; i < l; ++i) {
categories += categoriesArr[i];
if (i != categoriesArr.length-1) {
categories += mdash;
}
}
for (var i = 0, l = genresArr.length; i < l; ++i) {
genres += genresArr[i];
if (i != genresArr.length-1) {
genres += mdash;
}
}
var newtitle = document.title;
var myregex = new RegExp(" – .*", "gi");
newtitle = newtitle.replace(myregex, "");
myregex = new RegExp(" - .*", "gi");
newtitle = newtitle.replace(myregex, "");
newtitle = newtitle.replace("Netzkino","");
newtitle = newtitle.replace("kino","");
var dp = "";
if (newtitle != "") {
dp = ": ";
}
mediathek += '<html><head><title>' + scriptname + dp + newtitle + '</title><base href="https://www.netzkino.de/"><meta charset="utf-8">\n';
mediathek += '<link rel="icon" type="image/svg+xml" href="'+ favicon +'" />';
mediathek += '<style>body { margin: 10px; font-family: Arial; overflow-x: hidden; } img {width: 255px; text-decoration:none;border:none;} div {display: inline}\n';
mediathek += 'rect.imdb, svg.imdb, img.imdb {width: auto; height: auto;} .wrapper { display: grid; grid-gap: 10px; grid-template-columns: ' + colcount + '%; background-color: #fff; color: #444; }\n';
mediathek += '.sortlink {text-decoration: underline} .sortlink:hover {text-decoration: none} .box { background-color: #444; color: #fff; border-radius: 5px; padding: 10px; font-size: 100%; }\n';
mediathek += '.bottom {margin-top: ' + marcss + 'px;margin-bottom: ' + padcss + 'px;} .top {margin-top: ' + padcss + 'px;} .links {line-height: 1.35em}</style>\n</head><body>\n';
mediathek += '<span class="links"><a href="https://www.netzkino.de/">' + nfsvg +'</a> <br /> ' + newtitle;
if (newtitle != "") {
mediathek += ": ";
}
mediathek += prepared.length + " Titel " + mdash;
mediathek += '<a href="/search">Suchen?</a>' + mdash + 'Sortierung: Titel <a id="sortaz" class="sortlink">A-Z</a> / <a id="sortza" class="sortlink">Z-A</a> | Jahr <a id="sort09" class="sortlink">1940-2040</a> / <a id="sort90" class="sortlink">2040-1940</a> | Länge <a id="sortmin" class="sortlink"><<< (kurz)</a> / <a id="sortnim" class="sortlink">(lang) >>></a>';
mediathek += "<br />" + genres;
if (categoriesArr.length > 1) {
mediathek += "<br />" + categories;
}
mediathek += "</span><br /><br /><br />";
mediathek += '<div class="wrapper" id="nfct">';
mediathek += writetable(prepared);
mediathek += '</div></body></html>';
$tn("html")[0].innerHTML = mediathek.replace(/undefined/g, "");
$tn("body")[0].style.display = "block";
$tn("body")[0].style.visibility = "visible";
$("sortaz").onclick = function() {
var newlysorted = prepared.sort((a, b) => a.fulltitle.localeCompare(b.fulltitle));
$("nfct").innerHTML = writetable(newlysorted).replace(/undefined/g, "");
}
$("sortza").onclick = function() {
var newlysorted = prepared.sort((a, b) => b.fulltitle.localeCompare(a.fulltitle));
$("nfct").innerHTML = writetable(newlysorted).replace(/undefined/g, "");
}
$("sortmin").onclick = function() {
var newlysorted = prepared.sort((a, b) => a.runtime - b.runtime);
$("nfct").innerHTML = writetable(newlysorted).replace(/undefined/g, "");
}
$("sortnim").onclick = function() {
var newlysorted = prepared.sort((a, b) => b.runtime - a.runtime);
$("nfct").innerHTML = writetable(newlysorted).replace(/undefined/g, "");
}
$("sort09").onclick = function() {
var newlysorted = prepared.sort((a, b) => a.relyear - b.relyear);
$("nfct").innerHTML = writetable(newlysorted).replace(/undefined/g, "");
}
document.getElementById("sort90").onclick = function() {
var newlysorted = prepared.sort((a, b) => b.relyear - a.relyear);
$("nfct").innerHTML = writetable(newlysorted).replace(/undefined/g, "");
}
$tn("body")[0].onclick = function() {}
}
},
false);
setTimeout('document.getElementsByTagName("body")[0].click()', 10000);