4 ms·
Show HN: ZapFixed – Remove annoying fixed menus – Chrome extension
- tim333 12y agoI 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.
- iqonik 12y agoPretty cool, it would be useful if it could remember what it changed and allow you to toggle back in case i breaks the site you're on.
- tim333 12y agoTa, if I feel energetic I may implement that. At the moment if it breaks something you can refresh the page. I was also thinking of a keyboard shortcut and working on getting it to work with time.com. It doesn't do that one at the moment.
- deleted 12y ago[deleted]