Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
wea-f authored Oct 8, 2023
1 parent c3c84a6 commit 02994b9
Showing 1 changed file with 46 additions and 36 deletions.
82 changes: 46 additions & 36 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,55 +105,65 @@ <h5 id="socials"> Made by the user <a href="https://codepen.io/weaF_z" target=

</body>
<script>
function setFavicons(favImg) {
let headTitle = document.querySelector("head");
let setFavicon = document.createElement("link");
setFavicon.setAttribute("rel", "shortcut icon");
setFavicon.setAttribute("href", favImg);
headTitle.appendChild(setFavicon);
}

function fix_link() {
var link = document.getElementById("link").value
var link2 = link.replace(/ /gi, "")
var video_id = link.replace("https://www.youtube.com/watch?v=", "")
video_id = video_id.replace("https://youtu.be/", "")
var link = document.getElementById("link").value;

var link2 = link.replace(/ /gi, "");
var video_id = link.replace("https://www.youtube.com/watch?v=", "");
video_id = video_id.replace("https://youtu.be/", "");
//video_id = video_id.replace("&feature=emb_rel_pause", "")
video_id = video_id.replace("&embeds_euri=https%3A%2F%2Fcdpn.io%2F&feature=emb_rel_end", "")
var final_link = "https://www.youtube-nocookie.com/embed/" + video_id
final_link = final_link.replace("&feature=emb_rel_end","")
document.getElementById("video")
.src = final_link
}

document.body.onkeyup = function(c) {
if (c.key == "Enter" ||
c.code == "Enter" ||
c.keyCode == 13
) {
fix_link()

}
else if (c.key == "0") {
video_id = video_id.replace(
"&embeds_euri=https%3A%2F%2Fcdpn.io%2F&feature=emb_rel_end",
""
);
var final_link = "https://www.youtube-nocookie.com/embed/" + video_id;
final_link = final_link.replace("&feature=emb_rel_end", "");
document.getElementById("video").src = final_link;
}

document.body.onkeyup = function (c) {
if (c.key == "Enter" || c.code == "Enter" || c.keyCode == 13) {
fix_link();
} else if (c.key == "0") {
c.preventDefault();
c.stopPropagation();
c.stopPropagation();
window.location.replace("https://www.google.com/webhp?igu=1");
}
else if (c.key == "1") {
} else if (c.key == "1") {
c.preventDefault();
c.stopPropagation();
c.stopPropagation();
document.title = "My Drive - Google Drive";
document.querySelector("link[rel*='icon']").href = "https://ssl.gstatic.com/images/branding/product/1x/drive_2020q4_32dp.png";
setFavicons(
"https://ssl.gstatic.com/images/branding/product/1x/drive_2020q4_32dp.png"
);
}
}
};

function copy_link() {
var link = document.getElementById("link").value
var link2 = link.replace(/ /gi, "")
var video_id = link.replace("https://www.youtube.com/watch?v=", "")
video_id = video_id.replace("https://youtu.be/", "")
video_id = video_id.replace("&feature=emb_rel_pause", "")
video_id = video_id.replace("&embeds_euri=https%3A%2F%2Fcdpn.io%2F&feature=emb_rel_end","")
var final_link = "https://www.youtube-nocookie.com/embed/" + video_id
navigator.clipboard.writeText(final_link)
var link = document.getElementById("link").value;
var link2 = link.replace(/ /gi, "");
var video_id = link.replace("https://www.youtube.com/watch?v=", "");
video_id = video_id.replace("https://youtu.be/", "");
video_id = video_id.replace("&feature=emb_rel_pause", "");
video_id = video_id.replace(
"&embeds_euri=https%3A%2F%2Fcdpn.io%2F&feature=emb_rel_end",
""
);
var final_link = "https://www.youtube-nocookie.com/embed/" + video_id;
navigator.clipboard.writeText(final_link);
}

function how_it_works() {
window.open("https://github.com/wea-f/Norepted/tree/master")
window.open("https://github.com/wea-f/Norepted/tree/master");
}


</script>
</html>

0 comments on commit 02994b9

Please sign in to comment.