3 ms·
I thought I'd stick this thing up, partly because I thought it might be handy. It removes fixed menus which may be cluttering up your article when you click it.
by tim333 12y ago
I thought I'd stick this thing up, partly because I thought it might be handy. It removes fixed menus which may be cluttering up your article when you click it. I was getting annoyed with them on my laptop and would often resort to 'inspect element' and delete.
Also I was quite impressed how little code it took. Basically apart from the manifest file with the name of the app, it was the three or so lines below. I thought that might inspire someone wanting to make something similar:
There's this in the background.js file that says to call zap.js in the context of the open tab if someone clicks the button -
chrome.browserAction.onClicked.addListener(function(tab) {
chrome.tabs.executeScript({ file: 'zap.js' }); });
And the zap.js file has this to find the fixed items and remove them (and jquery) -
$('*').filter(function() { return $(this).css('position') === 'fixed'; }).hide();
And that's it mostly.