Verschönerung
This commit is contained in:
parent
4bea8c7f5a
commit
02ebd7f992
@ -4,7 +4,7 @@
|
|||||||
"name": "Witzig! - Nicht Witzig!",
|
"name": "Witzig! - Nicht Witzig!",
|
||||||
"version": "0.1",
|
"version": "0.1",
|
||||||
|
|
||||||
"description": "Replaces the thumb up and down in YouTube with an Witzig! and Nicht Witzig! stamp.",
|
"description": "Replaces the thumb up and down in YouTube with a Witzig! and a Nicht Witzig! stamp.",
|
||||||
|
|
||||||
"icons": {
|
"icons": {
|
||||||
"48": "icons/witzig-48.png"
|
"48": "icons/witzig-48.png"
|
||||||
@ -22,7 +22,6 @@
|
|||||||
],
|
],
|
||||||
|
|
||||||
"web_accessible_resources": [
|
"web_accessible_resources": [
|
||||||
"media/stempel-witzig.png",
|
|
||||||
"media/sticker-witzig.png",
|
"media/sticker-witzig.png",
|
||||||
"media/sticker-nicht-witzig.png"
|
"media/sticker-nicht-witzig.png"
|
||||||
]
|
]
|
||||||
|
24
witzig.js
24
witzig.js
@ -6,30 +6,6 @@ const thumb_down_path = 'html body ytd-app div#content.style-scope.ytd-app ytd-p
|
|||||||
const thumb_up_container_path = 'html body ytd-app div#content.style-scope.ytd-app ytd-page-manager#page-manager.style-scope.ytd-app ytd-watch.style-scope.ytd-page-manager.hide-skeleton div#top.style-scope.ytd-watch div#container.style-scope.ytd-watch div#main.style-scope.ytd-watch div#info.style-scope.ytd-watch div#info-contents.style-scope.ytd-watch ytd-video-primary-info-renderer.style-scope.ytd-watch div#container.style-scope.ytd-video-primary-info-renderer div#info.style-scope.ytd-video-primary-info-renderer div#menu-container.style-scope.ytd-video-primary-info-renderer div#menu.style-scope.ytd-video-primary-info-renderer ytd-menu-renderer.style-scope.ytd-video-primary-info-renderer div#top-level-buttons.style-scope.ytd-menu-renderer ytd-toggle-button-renderer.style-scope.ytd-menu-renderer.style-default-active.force-icon-button a.yt-simple-endpoint.style-scope.ytd-toggle-button-renderer yt-icon-button#button.style-scope.ytd-toggle-button-renderer.style-default-active';
|
const thumb_up_container_path = 'html body ytd-app div#content.style-scope.ytd-app ytd-page-manager#page-manager.style-scope.ytd-app ytd-watch.style-scope.ytd-page-manager.hide-skeleton div#top.style-scope.ytd-watch div#container.style-scope.ytd-watch div#main.style-scope.ytd-watch div#info.style-scope.ytd-watch div#info-contents.style-scope.ytd-watch ytd-video-primary-info-renderer.style-scope.ytd-watch div#container.style-scope.ytd-video-primary-info-renderer div#info.style-scope.ytd-video-primary-info-renderer div#menu-container.style-scope.ytd-video-primary-info-renderer div#menu.style-scope.ytd-video-primary-info-renderer ytd-menu-renderer.style-scope.ytd-video-primary-info-renderer div#top-level-buttons.style-scope.ytd-menu-renderer ytd-toggle-button-renderer.style-scope.ytd-menu-renderer.style-default-active.force-icon-button a.yt-simple-endpoint.style-scope.ytd-toggle-button-renderer yt-icon-button#button.style-scope.ytd-toggle-button-renderer.style-default-active';
|
||||||
const thumb_down_container_path = 'html body ytd-app div#content.style-scope.ytd-app ytd-page-manager#page-manager.style-scope.ytd-app ytd-watch.style-scope.ytd-page-manager.hide-skeleton div#top.style-scope.ytd-watch div#container.style-scope.ytd-watch div#main.style-scope.ytd-watch div#info.style-scope.ytd-watch div#info-contents.style-scope.ytd-watch ytd-video-primary-info-renderer.style-scope.ytd-watch div#container.style-scope.ytd-video-primary-info-renderer div#info.style-scope.ytd-video-primary-info-renderer div#menu-container.style-scope.ytd-video-primary-info-renderer div#menu.style-scope.ytd-video-primary-info-renderer ytd-menu-renderer.style-scope.ytd-video-primary-info-renderer div#top-level-buttons.style-scope.ytd-menu-renderer ytd-toggle-button-renderer.style-scope.ytd-menu-renderer.style-text.force-icon-button a.yt-simple-endpoint.style-scope.ytd-toggle-button-renderer yt-icon-button#button.style-scope.ytd-toggle-button-renderer.style-text';
|
const thumb_down_container_path = 'html body ytd-app div#content.style-scope.ytd-app ytd-page-manager#page-manager.style-scope.ytd-app ytd-watch.style-scope.ytd-page-manager.hide-skeleton div#top.style-scope.ytd-watch div#container.style-scope.ytd-watch div#main.style-scope.ytd-watch div#info.style-scope.ytd-watch div#info-contents.style-scope.ytd-watch ytd-video-primary-info-renderer.style-scope.ytd-watch div#container.style-scope.ytd-video-primary-info-renderer div#info.style-scope.ytd-video-primary-info-renderer div#menu-container.style-scope.ytd-video-primary-info-renderer div#menu.style-scope.ytd-video-primary-info-renderer ytd-menu-renderer.style-scope.ytd-video-primary-info-renderer div#top-level-buttons.style-scope.ytd-menu-renderer ytd-toggle-button-renderer.style-scope.ytd-menu-renderer.style-text.force-icon-button a.yt-simple-endpoint.style-scope.ytd-toggle-button-renderer yt-icon-button#button.style-scope.ytd-toggle-button-renderer.style-text';
|
||||||
|
|
||||||
/*
|
|
||||||
var thumb = false;
|
|
||||||
|
|
||||||
function get_thumb() {
|
|
||||||
|
|
||||||
thumb = document.querySelector(thumb_up_path);
|
|
||||||
if(!thumb) {
|
|
||||||
setTimeout(get_thumb, 100);
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
var witzig_stamp = document.createElement('img');
|
|
||||||
witzig_stamp.setAttribute('src', browser.extension.getURL("media/sticker-witzig.png"));
|
|
||||||
witzig_stamp.style.width = "100%";
|
|
||||||
|
|
||||||
document.querySelector(thumb_up_container_path).style.width = "100px";
|
|
||||||
|
|
||||||
thumb.innerHTML = "";
|
|
||||||
thumb.appendChild(witzig_stamp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
get_thumb();
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
function resize_container(css_path, width) {
|
function resize_container(css_path, width) {
|
||||||
document.querySelector(css_path).style.width = width;
|
document.querySelector(css_path).style.width = width;
|
||||||
|
Loading…
Reference in New Issue
Block a user