This repository was archived by the owner on Oct 28, 2019. It is now read-only.
Add fullscreen screenshots button#1584
Open
thomas-ashcraft wants to merge 2 commits intojshackles:devfrom
thomas-ashcraft:dev
Open
Add fullscreen screenshots button#1584thomas-ashcraft wants to merge 2 commits intojshackles:devfrom thomas-ashcraft:dev
thomas-ashcraft wants to merge 2 commits intojshackles:devfrom
thomas-ashcraft:dev
Conversation
Also deleted unwanted white-spaces.
|
Perhaps move this to Augmented Steam instead? |
Contributor
Author
A good idea. I will do it very soon. Perhaps partially from scratch, to make better code quality. |
Contributor
Author
|
Looks like there was a lot of progress in fullscreen api support among major browsers for a last year. I will check all of this more detailly and try to make proper code for "AS" today. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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,webkitandms. I didnt includedmsbecause it only for IE, and ES are not supposed to work with it. In case ES eventually comes to Edge: it useswebkitprefix.In perfect world there is should be a
:fullscreenpseudo-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 usedfullscreenchangeevent hook to add/remove customes_fullscreenclass which I basically used as:fullscreenpseudo. 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_modalappears in DOM. Theoretically there is may be a way to apply this button only once if someone knows a way how to editscreenshot_popup_modaltemplate at internal Steam's functions. But it's not a fact.