rafaelgomesxyz / esgst

An extension that enhances SteamGifts / SteamTrades.
MIT License
146 stars 23 forks source link

Giveaway Filters: fix bug that does not filter after hiding a game #1636

Closed Gaffi closed 3 years ago

Gaffi commented 4 years ago

Description When entering a giveaway, I have my ESGST filters hide that specific giveaway from the giveaway page. This lets me see only active, unentered giveaways unless I turn the filter off. The hiding occurs instantly - when I click the enter button, the giveaway immediately disappears from the screen.

However, if a new game pops up in the giveaway list that I want to hide using the in-built SteamGifts hide game functionality (eye icon), then any subsequent entries on the same page no longer hide. They will be dimmed, showing they are entered, but they remain visible. Reloading the page and/or moving to another page and back will correct the error, but it's a small annoyance that functionality is different because of that action.

Additionally, the information about how many items are filtered/cost to enter does not update when a game is hidden.

Steps to Reproduce

  1. Apply settings/filters as listed below under Additional Context
  2. Load up a page of giveaways.
  3. Enter some from the main listing page (not the specific giveaway page).
  4. Watch the entered items disappear from the page.
  5. Mark a game as hidden using the SteamGift eye (not the ESGST single-item filter eye) from the main listing page.
  6. Enter another game as in step 3.
  7. Watch the entered item turn dim, but not disappear.

Expected Behavior Entered giveaways should disappear the same way as they do when no giveaways are hidden prior.

Console Errors esgst.js:88 Uncaught (in promise) TypeError: Cannot read property 'setAttribute' of undefined at Go.cfh_saveReply (esgst.js:88) at Go.cfh_setReply (esgst.js:88) at Object.setPopout (esgst.js:88) at Go.init (esgst.js:88) at async I.loadFeatures (esgst.js:1) at async t (esgst.js:88) esgst.js:25 Uncaught (in promise) TypeError: Cannot read property 'classList' of null at ca.filters_filter (esgst.js:25) at ac.elgb_enterGiveaway (esgst.js:88)

Screenshots ESGST1 ESGST2 ESGST3 ESGST4

System (please complete the following information):

Additional Context Active ESGST Settings (that I believe are relevant):

Filter settings:

I use a number of other scripts/extensions which may or may not interfere with this operation.

rafaelgomesxyz commented 3 years ago

Seems similar to #1642. And like with that issue, I can't reproduce. If you could share your settings file, I may be able to reproduce and find the problem.

Gaffi commented 3 years ago

Would simply copy-pasting the json here work? Or would you prefer an upload?

rafaelgomesxyz commented 3 years ago

Any way you prefer is fine.

Gaffi commented 3 years ago

{"settings":{"leftMainPageHeadingIds":["df_s_s","gf_s_s","tf_s_s","uf_s_s","gmf"],"rightMainPageHeadingIds":[],"elementOrdering":"1","registrationDate_sg":1456958922,"dismissedOptions":["aic","aic_b","ail","ap","at","at_format","at_t","cdr","cdr_b","cdr_days","cdr_d","chfl","chfl_key","common","ef","ef_filters","es","es_ch","es_df","es_tf","es_dh","es_gb","es_ged","es_ge","es_gf","es_cl","es_pages","es_r","es_rd","es_pd","ev","ff","fh","fmph","fs","gdttt","gdttt_g","gdttt_vd","gdttt_vg","gdttt_vt","gdttt_vts","hbs","hcp","hcp_v","hr","hr_minutes","hr_w","hr_w_format","hr_w_n","hr_w_n_s","hr_w_n_s_sound","hr_w_h","hr_w_hours","hr_g","hr_g_format","hr_g_n","hr_g_n_s","hr_g_n_s_sound","hr_b","hr_c","hr_fp","hr_fp_s","hr_fp_s_sound","hr_p","hr_p_format","hr_m","hr_m_n","hr_m_n_s","hr_m_n_s_sound","hr_a","hr_a_r","hr_a_a","ib","lpl","lpv","mm","nm","ns","plt","plt_format","pnot","pnot_s","pv","qiv","qiv_p","scb","sk","sk_cp","sk_closePopups","sk_sb","sk_searchBox","sk_fp","sk_firstPage","sk_pp","sk_previousPage","sk_np","sk_nextPage","sk_lp","sk_lastPage","sk_tf","sk_toggleFilters","sk_hg","sk_hideGame","sk_hga","sk_hideGiveaway","sk_ge","sk_giveawayEntry","sk_c","sk_creator","sk_rb","sk_replyBox","sk_ru","sk_replyUser","sk_sr","sk_submitReply","smgb","stbb","sto","sttb","ts","ttpcc","ttpcc_a","urlr","vai","vai_gifv","vfl","ags","as","as_t","bgl","cec","cec_t","cewgd","cgb","cgb_b","cgb_p","cgb_io","cgb_rr","cgb_g","cgb_w","cgb_sgt","cgc","cgc_dateFormat","cgc_timeFormat","cwsl","dkc","egs","egs_e","elgb","elgb_b","elgb_c","elgb_f","elgb_filters","elgb_p","elgb_r","elgb_r_d","elgb_fp","elgb_d","et","gas","gb","gb_u","gb_ue","gb_ui","gb_h","gb_hours","gb_t","gb_se","gch","gcl","ge","ge_p","ge_j","ge_sgt","ge_sgt_l","ge_sgt_limit","ge_sgtga","ge_sgtga_u","ge_t","ged","ged_b","ged_t","gesl","geth","gf","gf_s","gf_m","gf_m_b","gf_m_a","gf_level","gf_entries","gf_copies","gf_points","gf_comments","gf_minutesToEnd","gf_minutesFromStart","gf_chance","gf_projectedChance","gf_chancePerPoint","gf_projectedChancePerPoint","gf_ratio","gf_projectedRatio","gf_pointsToWin","gf_rating","gf_reviews","gf_releaseDate","gf_pinned","gf_public","gf_inviteOnly","gf_group","gf_whitelist","gf_regionRestricted","gf_enterable","gf_currentlyEnterable","gf_created","gf_received","gf_notReceived","gf_awaitingFeedback","gf_entered","gf_started","gf_ended","gf_deleted","gf_owned","gf_wishlisted","gf_followed","gf_hidden","gf_ignored","gf_previouslyEntered","gf_previouslyWon","gf_fullCV","gf_reducedCV","gf_noCV","gf_sgTools","gf_groups","gf_creators","gf_winners","gf_learning","gf_removed","gf_banned","gf_tradingCards","gf_achievements","gf_singleplayer","gf_multiplayer","gf_steamCloud","gf_linux","gf_mac","gf_dlc","gf_dlcOwned","gf_dlcFree","gf_dlcNonFree","gf_package","gf_earlyAccess","gf_genres","gf_tags","gf_os","gf_alreadyOwned","gf_dlcMissingBase","gf_aboveLevel","gf_manuallyFiltered","ggl","ggl_m","glh","gp","gptw","gptw_e","gr","gr_a","gr_r","gts","gv","gv_gb","gv_ged","gv_ge","gwc","gwc_e","gwc_a","gwc_a_b","gwc_h","gwc_h_width","gwl","gwr","gwr_e","gwr_a","gwr_a_b","gwr_h","gwr_h_width","hgebd","hgm","itadi","mgc","npth","npth_previousKey","npth_nextKey","ochgb","ochgb_f","pgb","qgs","qgs_h","rcvc","sal","sgac","sgg","sks","ttec","ueg","ugb","ugs","viog","adots","codb","df","df_s","df_m","df_m_b","df_m_a","df_comments","df_announcements","df_bugsSuggestions","df_deals","df_general","df_groupRecruitment","df_letsPlayTogether","df_offTopic","df_puzzles","df_uncategorized","df_created","df_poll","df_highlighted","df_visited","df_unread","df_authors","dh","dh_t","ds","dt","dt_s","mpp","mpp_r","mps","oadd","oadd_d","pm","pm_a","radb","hwlc","tb","tb_a","tf","tf_s","tf_m","tf_m_b","tf_m_a","tf_comments","tf_created","tf_visited","tf_unread","tf_authors","tf_positiveReputation","tf_negativeReputation","cerb","cerb_a","cf","cf_m","cf_m_b","cf_m_a","cf_bump","cf_length","cf_words","cfh","cfh_bq","cfh_b","cfh_h1","cfh_h2","cfh_h3","cfh_ic","cfh_i","cfh_lb","cfh_lc","cfh_ol","cfh_pc","cfh_s","cfh_st","cfh_ul","cfh_img","cfh_l","cfh_t","cfh_e","cfh_g","cfh_p","cfh_p_a","cfh_sr","cfh_cf","cfh_ghwsgi","ch","cr","cs","ct","ct_a","ct_o","ct_c","ct_s","ct_s_h","ct_f","ct_r","cv","cv_username","cv_steamId","cv_creator","cv_replyUser","mr","rbot","rbp","rfi","rfi_s","rfi_c","rml","rrbp","iwh","luc","luc_c","namwc","namwc_h","namwc_h_m","namwc_h_f","namwc_h_i","nrf","pl","pl_w","pl_b","pl_g","pl_gs","pl_wl","rwscvl","rwscvl_r","sgc","sgpb","stpb","swr","uf","uf_d","uf_g","uf_p","ugd","ugd_s","ugd_g","uh","ul","un","un_p","us","ust","ut","ut_s","vgb","vgb_wonFormat","vgb_sentFormat","vrcv","wbc","wbc_h","wbc_n","wbc_hb","wbh","wbh_b","wbh_w","wbm","wbs","gh","glwc","gpf","gpf_m_b","gpf_m_a","gpf_users","gpf_lastGiveaway","gpf_officialGameGroup","gpf_open","gpf_restricted","gpf_closed","gpt","gpt_s","gs","gs_t","egh","gc","gc_e","gc_lp","gc_lp_gv","gc_b","gc_il","gc_a","gc_a_s","gc_a_s_i","gc_bd","gc_bd_s","gc_bd_s_i","gc_bvg","gc_bvg_s","gc_bvg_s_i","gc_dlc","gc_dlc_s","gc_dlc_s_i","gc_dlc_b","gc_dlc_o","gc_ea","gc_ea_s","gc_ea_s_i","gc_f","gc_f_s","gc_f_s_i","gc_fcv","gc_fcv_s","gc_fcv_s_i","gc_g","gc_g_s","gc_g_udt","gc_gi","gc_h","gc_h_s","gc_h_s_i","gc_hltb","gc_i","gc_i_s","gc_i_s_i","gc_i_t","gc_lg","gc_lg_s","gc_lg_s_i","gc_l","gc_l_s","gc_l_s_i","gc_m","gc_m_s","gc_m_s_i","gc_mp","gc_mp_s","gc_mp_s_i","gc_ncv","gc_ncv_s","gc_ncv_s_i","gc_ncv_o","gc_o","gc_o_s","gc_o_s_i","gc_o_a","gc_o_a_t","gc_o_t","gc_p","gc_p_s","gc_p_s_i","gc_p_t","gc_pw","gc_pw_o","gc_pw_s","gc_pw_s_i","gc_r","gc_r_s","gc_rcv","gc_rcv_s","gc_rcv_s_i","gc_rd","gc_rm","gc_rm_s","gc_rm_s_i","gc_sp","gc_sp_s","gc_sp_s_i","gc_sc","gc_sc_s","gc_sc_s_i","gc_tc","gc_tc_s","gc_tc_s_i","gc_w","gc_w_s","gc_w_s_i","gc_w_t","gt","gt_s","removeSidebarInFeaturePages","openSettingsInTab","activateTab","manipulateCookies","addNoCvGames","askFileName","autoBackup","autoBackup_days","autoSync","openAutoSyncPopup","updateHiddenGames","updateWhitelistBlacklist","calculateDelete","backupZip","calculateExport","calculateImport","notifyNewVersion","makeSectionsCollapsible","esgst","enableByDefault","fallbackSteamApi","static_popups","minimizePanel","getSyncGameNames","showChangelog","showFeatureNumber","sgDarkGrey","sgv2Dark","steamGiftiesBlack","steamGiftiesBlue","steamTradiesBlackBlue","customTheme"],"importAndMerge":0,"ap_sg":1,"ef_sg":1,"ff_sg":1,"fmph_sg":1,"fh_sg":1,"gv_sg":1,"itadi_sg":0,"rwscvl_sg":0,"pl_sg":0,"gf_sg":1,"gf_preset":"Default","gf_presets":[{"name":"Default","rules":{"condition":"AND","rules":[{"id":"entered","field":"entered","type":"boolean","input":"radio","operator":"equal","value":false},{"id":"hidden","field":"hidden","type":"boolean","input":"radio","operator":"equal","value":false}],"not":false,"valid":true}},{"name":"DefaultUser","rules":{}},{"name":"DefaultGroups","rules":{}},{"name":"DefaultCreated","rules":{}},{"name":"DefaultWon","rules":{}},{"name":"DefaultWishlist","rules":{}},{"name":"DefaultRecommended","rules":{}},{"name":"DefaultGroup","rules":{}},{"name":"DefaultEntered","rules":{}},{"name":"DefaultNew","rules":{}}],"gf_entered_sg":1,"gf_hidden_sg":1,"gf_enable":true,"elgb_sg":1,"elgb_f_sg":0,"elgb_p_sg":0,"elgb_fp_sg":0,"elgb_r_sg":0,"ochgb_sg":0,"hgm_sg":0,"qiv_sg":0,"rfi_sg":1,"uf_sg":0,"es_sg":{"enabled":1,"include":[{"enabled":1,"pattern":".*","options":{"pause":true}}],"exclude":[],"new":false},"gf_s_sg":1,"gf_presetUser":"DefaultUser","ef_filters":"[esgst.giveawaysPath].featured__container","gf_presetGroups":"DefaultGroups","gf_presetCreated":"DefaultCreated","gf_presetWon":"DefaultWon","namwc_sg":1,"esgst_sgtools":1,"ts_sg":1,"cfh_sg":1,"cfh_p_sg":1,"cfh_t_sg":1,"cfh_e_sg":1,"cfh_cf_sg":1,"cfh_p_a_sg":1,"cfh_sr_sg":1,"es_pd_sg":1,"es_rd_sg":0,"gf_presetWishlist":"DefaultWishlist","gf_presetRecommended":"DefaultRecommended","gf_presetGroup":"DefaultGroup","gf_presetEntered":"DefaultEntered","es_gb_sg":0,"radb_sg":0,"cfh_pasteFormatting":false,"leftButtonIds":["usc","wbm","ust","glwc","cec","aic","as","cf","cs","ctGo","ctRead","ctUnread","df","ds","gas","ge","gf","gts","gv","hgm","mm","mpp","namwc","rbp","sks","tb","ugs","wbc","wbsAsc","wbsDesc"],"rightButtonIds":["esNext","esContinuous","sttb","stbb","esRefreshAll","esRefresh","esPause","esResume"],"export_decryptedGiveaways":1,"export_discussions":1,"export_discussions_main":1,"export_discussions_ct":1,"export_discussions_df":1,"export_discussions_dh":1,"export_discussions_dt":1,"export_discussions_gdttt":1,"export_discussions_pm":1,"export_emojis":1,"export_entries":1,"export_games":1,"export_games_main":1,"export_games_egh":1,"export_games_gt":1,"export_games_itadi":1,"export_giveaways":1,"export_giveaways_main":1,"export_giveaways_ct":1,"export_giveaways_gb":1,"export_giveaways_gdttt":1,"export_giveaways_gf":1,"export_giveaways_ggl":1,"export_groups":1,"export_groups_main":1,"export_groups_gpt":1,"export_groups_sgg":1,"export_rerolls":1,"export_savedReplies":1,"export_settings":1,"export_sgCommentHistory":1,"export_stickiedCountries":1,"export_templates":1,"export_themes":1,"export_tickets":1,"export_tickets_main":1,"export_tickets_ct":1,"export_tickets_gdttt":1,"export_tickets_ust":1,"export_trades":1,"export_trades_main":1,"export_trades_ct":1,"export_trades_tf":1,"export_trades_gdttt":1,"export_users":1,"export_users_main":1,"export_users_namwc":1,"export_users_nrf":1,"export_users_uf":1,"export_users_giveaways":1,"export_users_notes":1,"export_users_tags":1,"export_users_wbc":1,"export_winners":1,"gc_o_altAccounts":[],"syncHiddenGames":1,"autoSyncHiddenGames":10,"lastSyncHiddenGames":1603365654615,"ugd_sg":1,"ugd_getAchievements":1,"ugd_forceUpdate":1,"gf_s_s_sg":1,"gf_enableGroup":0,"gs_sg":1,"gs_averageEntries_sg":1,"gs_giveaways_sg":1,"gs_giftsSent_sg":1,"gs_winners_sg":0,"gs_contributors_sg":1,"gf_m_sg":1,"cl_sg":1,"cl_gi_sg":1,"cl_ui_sg":1,"ff_st":0,"fh_st":0,"fmph_st":0,"ts_st":0,"permissionsDenied":["cookies","server","revadike"],"notifyLogs_sg":1,"openAutoSyncNewTab_sg":0,"openSettingsInTab_sg":1,"updateHiddenGames_sg":1,"ged_sg":1,"ged_b_sg":1,"ged_t_sg":1,"export_discussions_tds":1,"export_savedReplies_st":1,"export_trades_tds":1,"export_users_cdr":1,"es_paused_g_sg":true,"es_paused_c_sg":true,"es_paused_l_sg":true,"gf_presetNew":"DefaultNew","gc_gi_sg":{"enabled":1,"include":[{"enabled":1,"pattern":".*"}],"exclude":[],"new":true},"rcvc_sg":{"enabled":1,"include":[{"enabled":1,"pattern":".*"}],"exclude":[],"new":true},"cewgd_sg":{"enabled":1,"include":[{"enabled":1,"pattern":".*"}],"exclude":[],"new":true},"showMessages_sg":{"enabled":1,"include":[{"enabled":1,"pattern":".*"}],"exclude":[],"new":true},"cfh_ghwsgi_sg":{"enabled":1,"include":[{"enabled":1,"pattern":".*"}],"exclude":[],"new":true},"ugb_sg":{"enabled":1,"include":[{"enabled":1,"pattern":".*"}],"exclude":[],"new":true},"gf_m_f_sg":{"enabled":1,"include":[{"enabled":1,"pattern":".*"}],"exclude":[],"new":true},"showFeatureNumber_sg":{"enabled":1,"include":[{"enabled":1,"pattern":".*"}],"exclude":[],"new":true}},"v":12}

marlop352 commented 3 years ago

I think I'm affected by this bug, but my error is diferentt:

18:06:37.138 this.ge is undefined esgst.js:1:172667 18:06:37.144 TypeError: s.parentElement is null esgst.js:25:129518

Firefox 82.0.2 ESGST extension 8.8.3

rafaelgomesxyz commented 3 years ago

Sorry for the delay. I can finally reproduce and will fix it for the next version.