Skip to content

Commit

Permalink
isset(sources)
Browse files Browse the repository at this point in the history
  • Loading branch information
bekucera committed May 10, 2024
1 parent c4b37ca commit bb3a4c0
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions prehrajto.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@
// @description 5/10/2024, 10:46:53 AM
// ==/UserScript==

h1 = document.getElementsByTagName("h1")[0];
buttons = "";
sources.videos.map((item) => {
buttons += `<a href="${item.src}">${item.res}p</a><br>`;
});
h1.innerHTML = `${h1.innerHTML}<br/>${buttons}`;
if (typeof sources !== 'undefined') {
h1 = document.getElementsByTagName("h1")[0];
buttons = "";
sources.videos.map((item) => {
buttons += `<a href="${item.src}">${item.res}p</a><br>`;
});
h1.innerHTML = `${h1.innerHTML}<br/>${buttons}`;
}

0 comments on commit bb3a4c0

Please sign in to comment.