SteamGifts: Open in pop-in

Opens various links in pop-in window. This includes Giveaway links, links to Steam store and new messages.

As of 2016-02-02. See the latest version.

These are versions of this script where the code was updated. Show all versions.

  • v4.6 2017-07-07 A bit more cleanup + fixed minor error message in the console.
  • v4.5 2017-07-07 Code cleanup.
  • v4.4 2017-07-07 Slightly modified check for "mark as outdated" function to make it a bit simpler.
  • v4.3 2017-07-04 Fix for Firefox support.
  • v4.2 2017-05-30 Minor cleanup. Got rid of [].join() and simply concatenate strings now.
  • v4.1 2016-04-18 Apparently arrow function doesn't work properly with 'this' binding and always working in the window context. Fixed main page refresh after manual sync or after removing a giveaway from the entered list.
  • v4.0 2016-04-15 I got bored to remember to middle-click third-party links on StemDB when it's loaded in an iFrame, so I extended this script to also run on a SteamDB to add target="_blank" to such links, same as on SteamGifts.
  • v3.39 2016-04-13 Removed some outdated debug code added in a previous commit.
  • v3.38 2016-04-13 HTTPS support: Fixed loading SteamDB in a pop-in.
  • v3.37 2016-03-22 Reused global onclick handler to check for cases when parent page could become outdated. Click on the "Remove" links on the "Entered" page will mark parent document for refresh now... but this will not work if frame content will be reloaded.
  • v3.36 2016-03-14 Script may crash on attempt to set attribute Style of the SVG element directly via "svg.style =" instead of setAttribute.
  • v3.35 2016-03-11 Do not open comment links in a popin if this link is in the discussion section.
  • v3.34 2016-03-10 Minor fixes for SG++ support (SG++ alters pathname on the main page which cause some links to be treated as same-origin in my code) and jshint (hide possible strict mode violation on 'this').
  • v3.33 2016-03-02 Some extra error handling for case when loading non-existent page in pop-in and attempting to close it.
  • v3.32 2016-02-24 There is no reason to go to the deepest popin if intermediate one already marked as outdated. Also, should fix issue when top frame isn't refreshed when account popin was closed and different popin was opened.
  • v3.31 2016-02-23 Minor typo
  • v3.30 2016-02-23 I think it's only logical to reload a pages with active giveaways if users initiated account sync. So, I've implemented this feature.
  • v3.21 2016-02-16 Minor SG++ compatibility fix. When SG++ modifies header to be fixed it overlaps with top:-5px for header in my style.
  • v3.20 2016-02-16 Various CSS adjustments + now account button will be visible in all pop-ins, but user account pop-in.
  • v3.17 2016-02-15 Added permalinks to comments to known list.
  • v3.16 2016-02-15 SG++ compatibility fixes: Fixed compatibility with floating navigation bar and position of the sidebar in the the pop-in window.
  • v3.15 2016-02-15 Fixed available points synchronization. Looks like parent page may have a multiple fields with number of available points. Now all these fields will be updated.
  • v3.14 2016-02-15 Improved support for Discussions. Now separate discussions will be opened in a popin and without a sidebar.
  • v3.13 2016-02-15 Removed extra checks in the unknown links handler since we want to open all unknown links in a new tab if link is in the iframe.
  • v3.12 2016-02-15 Removed messaging system used to display spinner when iframe location changes. Now spinner will be visible while frame location changed but content isn't rendered yet. Also improved link handler a bit.
  • v3.11 2016-02-02 Now spinner should re-appear when frame location changes. Limitation of current implementation: there will be no spinner when SteamDB is loaded in a frame and location changes, works on for SteamGifts domain.
  • v3.10 2016-02-02 Added 'role' links in the user profile into known list. Now it will not replace user profile with his permissions list in the current popin.
  • v3.9 2016-02-02 Added Discussions category into known list. Now discussions will be opened in popin frame. Fixed wrong popin open when user going from About to Legit category or back.
  • v3.8 2016-02-02 Moved code responsible for opening unknown external links from iframe.onload function to the global link handler. Now target="_blank" attribute will be added on the fly and only to the clicked link.
  • v3.7 2016-02-02 Simplified same category link check a bit.
  • v3.6 2016-02-02 Fixed a couple of issue with popin opening or not opening.
  • v3.5 2016-02-01 Another major update, but without major visible changes this time: links handling is now global instead of attaching it per link, to avoid searching for already existing and newly added links. Also, replaced all code based on innerHTML with a proper DOM manipulations.
  • v3.0 2016-02-01 Major changes: now script runs before the document body is created to attach necessary styles before it's displayed - this removes flickering when frames are loading. Also, returned back notifications and points update through innerHTML property due to higher compatibility with third-party extensions.
  • v2.4 2016-02-01 Fixed position of number of remaining points in the navbar, broken in a recent commits.
  • v2.3 2016-02-01 Small clean-up.
  • v2.1 2016-02-01 Added experimental support for notification buttons synchronization between pop-ins.
  • v2.0 2016-01-31 Various code refactoring; Added pop-in mode for joined/won/created giveaways links in the sidebar and proper navigation between them while in the frame.
  • v1.24 2016-01-16 Added support for SG++ auto-paging method
  • v1.23 2016-01-04 According to Chrome console SVG animations is going to be deprecated. Replaced with CSS-based one.
  • v1.22 2015-12-09 Removed check for /app/ in the steam store address.
  • v1.21 2015-12-07 Initial support for returning points from frame to primary window. Also added some checks in places where code may return error message.
  • v1.20 2015-12-07 Now script will open steamdb.info instead of store.steampowered.com because Steam added X-Frame-Options into their header which prevents display of the page on the third-party sites.
  • v1.18 2015-02-26 Autopaging compatibility fix. New block with giveaways were added on site which caused wrong block detection as parent for autopaged giveaways.
  • v1.17 2015-02-16 Set hight z-index for overlay to cover underlaying objects with low z-index
  • v1.16 2015-02-16 Updated support for 'SteamGifts: Hide joined and perform autopaging' script
  • v1.15 2015-02-15 Added support for my experimental supplementary script "SteamGifts: Hide joined and autopaging".
  • v1.14 2015-02-14 Paging must not open in pop-in
  • v1.13 2015-02-14 Fix for Steam collections links (/sub/) and probably other. Now it will just detect "/store.steampowered.com/" in the URL. Additionally adjusted spinner - now it's auto-generated and consists of 10 bold lines instead of 7 thin.
  • v1.12 2015-02-14 Attempt to fix external links clicked inside of the pop-in window.
  • v1.11 2015-02-14 Applied better handling of giveaway and navigational links. Now only right 3 buttons and FAQ will trigger pop-in. Giveaway links won't trigger pop-in when opened from the left navigational menu.

Show all script versions

长期地址
遇到问题?请前往 GitHub 提 Issues。