Can you change where a pop-up window opens in your browser?
October 20, 2018 11:10 AM   Subscribe

I can’t believe I’m using a question for something so trivial, but: I’m an avid Pinboard user, and I use the bookmarklet to open the “save a bookmark” window. The window always opens in the lower left quadrant of my screen. I would like for it to open at the top center. Is there a way to change this?

I'm on Firefox 62.0.3, on OS X/10.11.6 if it matters. I'm also running uBlockOrigin, Adblock Plus, Disconnect, and Privacy Badger.

(Yes, I am aware this is an incredibly minor problem. It’s not even a “problem.” I just...want it a different way. I use that little window a lot!)
posted by Charity Garfein to Technology (5 answers total) 6 users marked this as a favorite
 
If this window is within the web page, as opposed to an operating system window you can drag around outside of the web browser, a first step could be to left-click on the window and pick the uBlock Origin “Block element” option. In uBlock's own popup you'd want to click on the different "Cosmetic filters" options until just the window you'd want to adjust is hilighted.

Then, pressing the “Preview” button should cause the window to disappear. You can press “Quit” in uBlock to get it back.

What this process accomplishes is to tell you the “CSS selector” for the window element you want to control, which is the bit of code in the form of a list of things separated with “>” greater-than signs at the top of the uBlock popup.

If all of that works, the next thing would be to install a Firefox extension like Stylish which will permit you to customize a web site's CSS rules and thereby adjust the position of the window. I've never played around with it but looking into it has been on my to-do list, so if you're able to find the CSS selector for the window and no one comes up with a simpler option I may be able to help you figure out how to move the window around.
posted by XMLicious at 11:36 AM on October 20, 2018


Best answer: I'm assuming that the bookmarklet you're talking about is the one listed on this page as "popup".

After dragging that bookmarklet to your toolbar, right-click it and choose Properties, then click in the Location field and tap the End key on your keyboard. You should see the last part of the bookmarklet's Javascript code that reads
'toolbar=no,width=700,height=350'));
Change that to
'toolbar=no,width=700,height=350,top=10,left=300'));
and click Save. See how that works for you. Fiddle with the numbers until it does what you want.
posted by flabdablet at 11:41 AM on October 20, 2018 [8 favorites]


Response by poster: Holy smokes, flabdablet, that worked perfectly. Thank you so much!
posted by Charity Garfein at 12:37 PM on October 20, 2018


BTW, you might be interested in the Pinboard+ Extension. It works a bit better than the popup IMHO. Although to your question, there's no easy way to tell it where to put the popup; it appears below the button. Upper right, in my browser.
posted by Nelson at 2:35 PM on October 20, 2018


that worked perfectly

...which entitles you to add "coding" to the list of Skills You've Begun To Master. Well done you!
posted by flabdablet at 10:35 PM on October 20, 2018 [2 favorites]


« Older soup short cuts   |   What kind of car is this? Newer »
This thread is closed to new comments.