Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Hide annoying elements on GameFAQs
- // @namespace MyUserScripts
- // @version 0.1
- // @description Hide annoying elements on GameFAQs
- // @author Sahuagin
- // @match https://gamefaqs.gamespot.com/boards/*
- // @exclude https://gamefaqs.gamespot.com/boards/*/*
- // @grant none
- // ==/UserScript==
- var $;
- (($) => {
- if (!$) {
- console.log("No JQuery!");
- return;
- }
- const smallPadding = "4px";
- $("<style>").html(`
- .board_search,
- .topic_filter {
- display: none;
- }
- `).appendTo("head");
- $("<style>").html(`
- #gs_search_results #results_table tr td,
- #faq_search_results #results_table tr td,
- #game_search_results #results_table tr td {
- padding: ${smallPadding};
- }
- `).appendTo("head");
- $(() => {
- $("#gamespace_search_input").css("padding", `${smallPadding} ${smallPadding} ${smallPadding} 42px`);
- $("#gamespace_search button").css("top", smallPadding);
- const buttonList = $("div.body ul");
- const newButton = $("<li><a>Search</a></li>");
- newButton.on("click", () => {
- $(".board_search").toggle(400);
- $(".board_search").css("overflow", "");
- $(".board_search input").focus();
- });
- buttonList.append(newButton);
- });
- })($ || ($ = window.jQuery));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement