Git Product home page Git Product logo

sg-wl-inventory's People

Contributors

gaffi avatar sighery avatar tristar7 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

tristar7

sg-wl-inventory's Issues

Duplicate results

I found a bug where the script works fine the first time I use it, but if I try to click "WHO WANTS?" after clicking "WHO OWNS?" (or vice versa), it'll incorrectly give me the same numbers. The same thing happens if I change the App ID and click either button. The only way I've found to fix the problem is to click "RESET CACHE" and then refresh the page. See the example screenshots below:

First, I clicked "WHO OWNS?" and got the correct number of owners.
who owns

Then I clicked "WHO WANTS?" and got the same number as the owners.
who wants - incorrect

After clicking "RESET CACHE", refreshing the page, and clicking "WHO WANTS?" again, I get the correct number of people who want the game.
who wants - correct

Progress button doesn't appear on SG and Steam Store after put the game ID.

Heres the log output from Chrome console from SG:

include.preload.js:425 Calling Element.createShadowRoot() for an element which already hosts a shadow root is deprecated. See https://www.chromestatus.com/features/4668884095336448 for more details.
VM744:74 Injecting SteamGifts
VM744:118 Creating button/progress bar on SteamGifts...
VM744:126 Whitelist inventory button loaded without errors.
VM744:133 Last updated: null - Needs to be updated if last updated before: Tue Sep 13 2016 12:12:31 GMT-0300 (Hora oficial do Brasil)
VM744:171 Scanning 22 total whitelisted users for game 360170
VM744:461 Scanning WL [https://www.steamgifts.com/account/manage/whitelist/search?page=1] for user list

Here's from Steam Store:

include.preload.js:425Calling Element.createShadowRoot() for an element which already hosts a shadow root is deprecated. See https://www.chromestatus.com/features/4668884095336448 for more details.
enhancedsteam.js:4 Enhanced Steam v8.8 by jshackles http://www.enhancedsteam.com
(index):1 GET http://store.akamai.steamstatic.com/public/shared/images/sharedfiles/bg_shared_item_guide.jpg 404 (Not Found)
VM537:70 Injecting Steam Store
VM537:87 Creating button/progress bar on Steam store...
VM537:190 Checking WL page [https://www.steamgifts.com/account/manage/whitelist] for user count.
VM537:101 Whitelist inventory button loaded without errors.
www-widgetapi.js:100 Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://www.youtube.com') does not match the recipient window's origin ('http://store.steampowered.com').g.C @ www-widgetapi.js:100g.H @ www-widgetapi.js:97
www-embed-player.js:222 GET https://googleads.g.doubleclick.net/pagead/id net::ERR_BLOCKED_BY_CLIENTUd @ www-embed-player.js:222Yd @ www-embed-player.js:225(anonymous function) @ www-embed-player.js:1251Eg @ www-embed-player.js:389zq @ www-embed-player.js:1250(anonymous function) @ www-embed-player.js:1302(anonymous function) @ qEIuzobwgZ8?enablejsapi=1&origin=http%3A%2F%2Fstore.steampowered.com&widgetid=1:10
www-embed-player.js:141 GET https://static.doubleclick.net/instream/ad_status.js net::ERR_BLOCKED_BY_CLIENTEc @ www-embed-player.js:141Bc @ www-embed-player.js:138yc @ www-embed-player.js:137ie @ www-embed-player.js:237(anonymous function) @ www-embed-player.js:1304(anonymous function) @ qEIuzobwgZ8?enablejsapi=1&origin=http%3A%2F%2Fstore.steampowered.com&widgetid=1:10
VM537:133 Last updated: null - Needs to be updated if last updated before: Tue Sep 13 2016 12:14:01 GMT-0300 (Hora oficial do Brasil)
VM537:171 Scanning 22 total whitelisted users for game 360170
VM537:461 Scanning WL [https://www.steamgifts.com/account/manage/whitelist/search?page=1] for user list

Change Title

Since this has started expanding beyond the simple check that the script started as, I need to find a more appropriate name for the tool.

API Key not saving properly

GM_setValue() and GM_getValue() do not refer to the same variable name when storing/retrieving the API key. This key may be used by other scripts, so reporting of the issue may have been spotty.

GM_setValue('SGLCdlg-APIKey', input.value);

vs.

GM_getValue('APIKey');

Fewer Alert Boxes

Alert boxes get in the way, prevent tab switching, etc. Change this to something like a text/input field on the page itself.

Improve Page Counting Algorithm

Currently, browses to the last page of a group/whitelist to get the page number from the href. Can more easily/quickly get the value by deriving the page count from the number of users. (Integer division of users/25)

button of SG-WL-Inventory did not appearing

VM457:58 Syntax error @ "SteamGifts Inventory Checker"!

JSHINT output:
script: (E030) Expected an identifier and instead saw 'else' on line: 198 at character: 7
script: (W030) Expected an assignment or function call and instead saw an expression on line: 198 at character: 7
script: (E058) Missing semicolon on line: 198 at character: 11
script: (E041) Unrecoverable syntax error. (37% scanned) on line: 223 at character: 5

SyntaxError: Unexpected token else
at C (eval at exec_fn (unknown source), :57:186)
at Object.create (eval at exec_fn (unknown source), :65:282)
at u (eval at exec_fn (unknown source), :14:88)(anonymous function) @ VM457:58(anonymous function) @ VM457:23e @ VM455:8(anonymous function) @ VM455:9e @ content.js:6(anonymous function) @ content.js:7sendResponseAndClearCallback @ extensions::messaging:363messageListener @ extensions::messaging:395target.(anonymous function) @ extensions::SafeBuiltins:19EventImpl.dispatchToListener @ extensions::event_bindings:388target.(anonymous function) @ extensions::SafeBuiltins:19publicClassPrototype.(anonymous function) @ extensions::utils:151EventImpl.dispatch_ @ extensions::event_bindings:372EventImpl.dispatch @ extensions::event_bindings:394target.(anonymous function) @ extensions::SafeBuiltins:19publicClassPrototype.(anonymous function) @ extensions::utils:151dispatchOnMessage @ extensions::messaging:336
VM457:57 Uncaught SyntaxError: Unexpected token else

Properly catch private users.

Currently, private users libraries are not properly caught when checking the API. Result is that when going through a user list, the private users are skipped, resulting in the user check off to never hit the full count. If the full count is not met, the code never finishes.

Should instead increment the count for the private user and assume non-ownership.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.