This repository has been archived by the owner on Oct 28, 2019. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Simple button which activates fullscreen mode to comfortly view screenshots at store pages.
How it looks like:
Try out
You can try it by installing userscript from here:
https://gist.github.com/thomas-ashcraft/00e58a0141fda12199d5e1fdee821ecf
Code is completely the same.
Technical notes:
I have tested unpacked ES with that code in Chrome. Everything works perfecrly. The code in userscript also have been tested in Firefox. Also works perfect.
Buttons at the fullscreen mode visible only when footer is
:hover
."Previous" button also triggers by pressing left part of the screen.
There is 3 prefixes around:
moz
,webkit
andms
. I didnt includedms
because it only for IE, and ES are not supposed to work with it. In case ES eventually comes to Edge: it useswebkit
prefix.In perfect world there is should be a
:fullscreen
pseudo-class. But right now for a proper working, CSS should be written completely separately for every each prefix. Should not stack through comma to write one rule for a different prefixes. To avoid multiply CSS strings I usedfullscreenchange
event hook to add/remove customes_fullscreen
class which I basically used as:fullscreen
pseudo. Like if it was finally properly implemented by all browsers.There is one more trick: css hook which triggers JS code which applies button every time
screenshot_popup_modal
appears in DOM. Theoretically there is may be a way to apply this button only once if someone knows a way how to editscreenshot_popup_modal
template at internal Steam's functions. But it's not a fact.