How to make a window stay always on top
A lot of Enhancer for YouTube™ users have asked me to add an option to make the pop-up player stay always on top of other windows, but it's not possible because browser extensions have limited capabilities so I'm gonna show you how you can easily do it using AutoHotkey, a popular free and open source software for Windows.
If you use Linux simply right-click on the title bar and select “Always on top".
How to install and use AutoHotkey
First you need to download the latest stable version of AutoHotkey v2.0 so go to the download page and click the “Download EXE” button. Once downloaded, execute the file and install AutoHotkey. Once the installation is complete the “AutoHotkey Dash” window will pop up. Click on “Editor settings” and select “Notepad” or any other editor you already have installed then press the OK button. At this point you can close or minimize the “AutoHotkey Dash” window.
Now follow these steps to create the script that will be used by AutoHotkey:
- On your desktop, right-click on an empty space and select “AutoHotkey Script” inside the “New” menu.
- The “New Script” window will pop up.
- In the first field give the script a name (e.g. AlwaysOnTop).
- The second field should already point to your desktop folder.
- Click the “Edit” button.
- Copy and paste the following code:
#Requires AutoHotkey v2.0 #Space:: { WinSetAlwaysOnTop -1, "Enhancer for YouTube™" }
- Save the file.
That's it! Now double-click the script to run it then select the pop-up player and press W (Windows icon key) and Spacebar on your keyboard. When you want to restore the default behavior select the pop-up player and press those keys again. When you want to completely stop the script right-click the green AutoHotkey icon in the system tray and select “Exit”.