Created
August 1, 2023 04:01
-
-
Save tyhallcsu/fdebe1c4717ad50d90268c99ff466c92 to your computer and use it in GitHub Desktop.
This userscript is designed to improve the user experience on WordPress admin pages by hiding a specific element with the class .ab-sub-wrapper. The .ab-sub-wrapper element is commonly associated with the WSSO (WordPress Social Sharing Optimization) overlay, which may sometimes obstruct or interfere with the admin interface. By running this user…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Hide WSSO Overlay | |
// @namespace http://empathyfirstmedia.com | |
// @version 1.0 | |
// @description Hides element with class .ab-sub-wrapper on WordPress admin pages | |
// @author Tyler Hall | |
// @match *://*/wp-admin/* | |
// @grant GM_addStyle | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
// Function to add custom CSS to hide the element | |
function hideElementByClass(className) { | |
GM_addStyle('.' + className + ' { display: none !important; }'); | |
} | |
// Hide the element with class .ab-sub-wrapper on WordPress admin pages | |
if (window.location.href.includes('/wp-admin')) { | |
hideElementByClass('ab-sub-wrapper'); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment