Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name LongHF
- // @version 1
- // @grant none
- // @match https://kinkyforums.com/forum/*
- // @namespace Costanza
- // ==/UserScript==
- 'use strict';
- function highlightMyPosts(){
- const a = document.getElementsByTagName('a');
- [...a].forEach(e => {
- if(e.innerText === ''){
- const parentRow = e.parentElement.parentElement;
- if(parentRow.classList.contains('posts-overview-table-row')){
- // style for top level rows
- parentRow.style.setProperty('background-color', '#fbebc5');
- parentRow.style.setProperty('font-weight','bold');
- } else {
- // style for post children
- e.style = "background-color: #fbebc5";
- }
- }
- });
- }
- function main() {
- highlightMyPosts();
- }
- window.addEventListener('load', function() {
- main();
- }, false);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement