Spacecat Simulator 2016 (steamgifts.com)

Makes the "You won a new gift" popup appear even if you haven't won anything

  1. // ==UserScript==
  2. // @name Spacecat Simulator 2016 (steamgifts.com)
  3. // @namespace Barefoot Monkey
  4. // @description Makes the "You won a new gift" popup appear even if you haven't won anything
  5. // @include https://www.steamgifts.com/
  6. // @include https://www.steamgifts.com/giveaways/search*
  7. // @version 1.2
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11.  
  12. // add background
  13. var bg = $('<div style="background-color: rgb(60, 66, 77); position: fixed; top: 0px; right: 0px; bottom: 0px; left: 0px; opacity: 0.85; z-index: 9998; cursor: pointer;" class="b-modal __b-popup1__"></div>').appendTo(document.body)
  14.  
  15. // add spacecat
  16. var popup = $('<div class="popup popup--gift-received"> <img src="https://cdn.steamgifts.com/img/cat/default.gif"> <p class="popup__heading"><span class="popup__heading__bold">Congratulations!</span><br>You won a new gift.</p> <a href="#" class="form__submit-button"><i class="fa fa-arrow-circle-right"></i> View Gift</a> <p class="popup__actions"> <span class="b-close">Close</span> </p> </div>').appendTo(document.body)
  17. popup.find('a.form__submit-button').click(function(event) {
  18. event.stopPropagation()
  19. event.preventDefault()
  20. alert('Sorry, this is just a simulation. No new gifts for you, unless you\'re lucky and there\'s another spacecat hiding under this one :3')
  21. })
  22.  
  23. popup.css({
  24. position: 'absolute',
  25. display: 'block',
  26. opacity: 1,
  27. 'z-index': 9999,
  28. top: window.scrollY + 0.41*(window.innerHeight - popup.outerHeight()),
  29. left: window.scrollX + 0.5*(window.innerWidth - popup.outerWidth())
  30. })
  31.  
  32. function close() {
  33. popup.fadeOut(500, popup.remove.bind(popup))
  34. bg.fadeOut(500, popup.remove.bind(bg))
  35. }
  36.  
  37. bg.click(close)
  38. popup.find('.b-close').click(close)
  39.  
  40. function move_popup(event) {
  41. popup.stop().animate(
  42. {
  43. top: window.scrollY + 0.48*($(window).height() - popup.outerHeight()),
  44. left: window.scrollX + 0.5*($(window).width() - popup.outerWidth())
  45. }, 500
  46. )
  47. }
  48.  
  49. $(document).scroll(move_popup)
  50. $(window).resize(move_popup)

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址