File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 601601 "message" : " Hide \" Install Steam\" button in header" ,
602602 "description" : " \" Install Steam\" should match what the button on Steam itself in the header says: https://store.steampowered.com/"
603603 },
604+ "options_enhancement_open_desktop_app_button" : {
605+ "message" : " Add a \" Open in Desktop App\" button in header"
606+ },
604607 "options_enhancement_hide_mobile_app_button" : {
605608 "message" : " Hide \" Open in Steam\" banner"
606609 },
665668 "options_builtin_achievements_csrating" : {
666669 "message" : " Display CS rating history on CS2 achievements page"
667670 },
668-
671+ "open_desktop_app" : {
672+ "message" : " Open in Desktop App"
673+ },
669674 "boostercreator_available_at_date" : {
670675 "message" : " You will not be able to create another Booster Pack for this game until $available_date$." ,
671676 "description" : " \" Booster Pack\" should match how Steam itself names it at: https://steamcommunity.com/tradingcards/boostercreator/" ,
Original file line number Diff line number Diff line change @@ -266,6 +266,10 @@ <h3 data-msg="options_header_enhancements"></h3>
266266 < input type ="checkbox " class ="option-check " data-option ="enhancement-hide-install-button " checked >
267267 < div data-msg ="options_enhancement_hide_install_button "> </ div >
268268 </ label >
269+ < label class ="checkbox ">
270+ < input type ="checkbox " class ="option-check " data-option ="enhancement-open-desktop-app-button ">
271+ < div data-msg ="options_enhancement_open_desktop_app_button "> </ div >
272+ </ label >
269273 < label class ="checkbox ">
270274 < input type ="checkbox " class ="option-check " data-option ="enhancement-hide-mobile-app-button ">
271275 < div data-msg ="options_enhancement_hide_mobile_app_button "> </ div >
Original file line number Diff line number Diff line change @@ -21,7 +21,11 @@ document.title === 'We Broke It' )
2121}
2222else
2323{
24- GetOption ( { 'enhancement-hide-install-button' : true , 'enhancement-no-linkfilter' : false } , ( items ) =>
24+ GetOption ( {
25+ 'enhancement-hide-install-button' : true ,
26+ 'enhancement-open-desktop-app-button' : false ,
27+ 'enhancement-no-linkfilter' : false
28+ } , ( items ) =>
2529 {
2630 if ( items [ 'enhancement-hide-install-button' ] )
2731 {
3539 }
3640 }
3741
42+ if ( items [ 'enhancement-open-desktop-app-button' ] )
43+ {
44+ const installSteamBtn = document . querySelector ( '.header_installsteam_btn' ) ;
45+
46+ if ( installSteamBtn )
47+ {
48+ const button = document . createElement ( 'a' ) ;
49+ button . className = 'steamdb_open_desktop_app' ;
50+ button . href = 'steam://openurl/' + window . location ;
51+ button . textContent = _t ( 'open_desktop_app' ) ;
52+ installSteamBtn . insertAdjacentElement ( 'afterend' , button ) ;
53+ }
54+ }
55+
3856 if ( items [ 'enhancement-no-linkfilter' ] )
3957 {
4058 /** @type {NodeListOf<HTMLAnchorElement> } */
Original file line number Diff line number Diff line change 4949.steamdb_trade_error_explained : hover {
5050 text-decoration : underline;
5151}
52+
53+ .steamdb_open_desktop_app {
54+ display : inline-block;
55+ padding : 0 9px ;
56+ margin-left : 4px ;
57+ background-color : # 5c7e10 ;
58+ color : # e5e4dc ;
59+
60+ & : hover {
61+ background-color : # 6c9018 ;
62+ color : # fff ;
63+ transition-property : background;
64+ transition-duration : 250ms ;
65+ cursor : pointer;
66+ }
67+ }
You can’t perform that action at this time.
0 commit comments