Skip to content

Instantly share code, notes, and snippets.

@TheReptile
Created March 23, 2021 10:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TheReptile/2249b3a498d68de3185c1ceb21c4cb4e to your computer and use it in GitHub Desktop.
Save TheReptile/2249b3a498d68de3185c1ceb21c4cb4e to your computer and use it in GitHub Desktop.
// ==UserScript==//
// @name Add the quicklinks after the breadcrumbs in the footer of forum messages of GoT
// @namespace addquicklinksfooter.got
// @description This userscripts adds the quicklinks after the breadcrumbs just like in the header
// @include *://gathering.tweakers.net/forum/list_message*/*
// @version 1.0
// ==/UserScript==
// Copy the quicklinks DIV
let quicklinkscopy = document.getElementById ('forumheading').firstElementChild.outerHTML;
// Location where the quicklinks DIV should be inserted
let footer = document.getElementById ('footer').firstElementChild;
// Insert the quicklinks in the footer
footer.insertAdjacentHTML('afterbegin', quicklinkscopy);
// Add some css to copy the layout in the forumheading (originally defined in forum.css)
GM_addStyle (`
#footer .quicklinks {
float: right;
font-size: 11px;
margin-left: 20px;}
#footer .quicklinks li:first-child {
display: none;
}
#footer .quicklinks li:nth-child(2)::before{
content: none;
}
`);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment