Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- / ==UserScript==
- // @name Hololive EN Schedule add red line for current time
- // @namespace Violentmonkey Scripts
- // @match https://teamup.com/ksgvawzp4akez27rf1
- // @grant none
- // @version 0.5
- // @author -
- // @description 11/23/2020, 2:16:36 PM
- // ==/UserScript==
- (function(){
- 'use strict';
- (new MutationObserver(check)).observe(document, {childList: true, subtree: true});
- function check(changes, observer) {
- if(document.querySelector('.start-time')) {
- observer.disconnect();
- var c = document.getElementsByClassName('drag dropzone js-dnd-time-grid-row day-time-inner');
- var ca = Array.from(c);
- for (let [index, val] of Object.entries(ca)){
- var dd = val.getAttribute('data-date')
- var d = new Date()
- if(new Date(dd) > d){
- var lindex = index - 1
- if (lindex < 0){
- lindex = 0
- }
- c[lindex].style.borderTopColor = "red";
- c[lindex].style.borderTopStyle = "solid";
- c[lindex].style.borderTopWidth = "3px";
- break;
- }
- }
- }
- }
- })();
Advertisement
Add Comment
Please, Sign In to add comment