diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 53d0090a..8b94175b 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -61,12 +61,11 @@ jobs: asset_path: ./saltbot.zip asset_name: saltbot ${{env.TAG_VERSION}}.zip asset_content_type: application/zip - - name: Publish in Chrome Store - uses: Passiverecords/chrome-extension-upload-action@1.4.1 + - name: Publish in Firefox Store + uses: trmcnvn/firefox-addon@v1 with: - app-id: 'bholoegapebhflljekancpcnajigaiih' - file-name: './saltbot.zip' - client-id: ${{ secrets.CLIENT_ID }} - client-secret: ${{ secrets.CLIENT_SECRET }} - refresh-token: ${{ secrets.REFRESH_TOKEN }} - publish: true + uuid: '{19d4bb02-364f-4095-b061-92cfeb308d1e}' + xpi: ./saltbot.zip + manifest: dist/manifest.json + api-key: ${{ secrets.FIREFOX_API_KEY }} + api-secret: ${{ secrets.FIREFOX_API_SECRET }} diff --git a/README.md b/README.md index 045113ce..fef3b694 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ A betting bot for [SaltyBet.com](http://saltybet.com) * Read about it [**here**](http://explosionduck.com/wp/story-of-a-betting-bot/) and learn how to use it [**here**](http://explosionduck.com/wp/so-you-want-to-use-saltbot/). * Download sample data(match record and chromosome) above or [**click here.**](https://github.com/saltbot-org/saltbot/tree/master/data/2020-01-27) -* Download the app from the Chrome Store [**here**](https://chrome.google.com/webstore/detail/saltbot/bholoegapebhflljekancpcnajigaiih). +* Install the Add-On from Firefox [**here**](https://addons.mozilla.org/de/firefox/addon/salt-bot/). # System Requirements **Minimum Specs:** @@ -15,7 +15,7 @@ A betting bot for [SaltyBet.com](http://saltybet.com) * Quad Core processor 3.0Ghz+ * 8gb DDR3 RAM 1600mhz -# Installing latest version(Chrome/Chromium) +# Installing latest version(Firefox) To install the git version of this extension: * Clone the repo: @@ -26,19 +26,12 @@ To install the git version of this extension: * Open the command line and go to the base of the project where the file package.json is located * Run `npm install && npm run build` -* Open chrome extension settings and enable developer mode -* Click "load unpacked extension" -* Navigate to the '/dist/' folder and load it +* Open [about:debugging#/runtime/this-firefox](about:debugging#/runtime/this-firefox) +* Click "Load Temporary Add-On..." * Import the data and chromosome files * Select your preferred mode and settings and let it run. -# Updating - -To keep your version up to date simply: -* Run `git pull` -* Run `npm install && npm run build` -* Open Chrome Extension settings and click "reload" on Saltbot -* Reload saltybet.com and the twitch chat tab +This version of Saltbot will only be available until Firefox is closed. # Bug Reports diff --git a/dist/config.html b/dist/config.html index 0f5a559e..6f1f3c3d 100644 --- a/dist/config.html +++ b/dist/config.html @@ -5,7 +5,12 @@ + + + + + @@ -37,6 +42,22 @@

Keep alive

Restore crashed or closed saltybet tabs

+

Chromosome Management

+
+ Export +
+
+ Import +
+

Records Management

+
+ Export +
+
+ Import +
+ +

Display Player Rankings

Players by % @@ -48,6 +69,7 @@

Display Player Rankings

+
diff --git a/dist/css/jquery-ui.css b/dist/css/jquery-ui.css index 2f0601a6..9823efc8 100644 --- a/dist/css/jquery-ui.css +++ b/dist/css/jquery-ui.css @@ -1,14 +1,20 @@ -/*! jQuery UI - v1.13.1 - 2022-01-20 +/*! jQuery UI - v1.12.1 - 2017-07-06 * http://jqueryui.com -* Includes: core.css, accordion.css, autocomplete.css, menu.css, button.css, controlgroup.css, checkboxradio.css, datepicker.css, dialog.css, draggable.css, resizable.css, progressbar.css, selectable.css, selectmenu.css, slider.css, sortable.css, spinner.css, tabs.css, tooltip.css, theme.css -* To view and modify this theme, visit http://jqueryui.com/themeroller/?bgShadowXPos=&bgOverlayXPos=&bgErrorXPos=&bgHighlightXPos=&bgContentXPos=&bgHeaderXPos=&bgActiveXPos=&bgHoverXPos=&bgDefaultXPos=&bgShadowYPos=&bgOverlayYPos=&bgErrorYPos=&bgHighlightYPos=&bgContentYPos=&bgHeaderYPos=&bgActiveYPos=&bgHoverYPos=&bgDefaultYPos=&bgShadowRepeat=&bgOverlayRepeat=&bgErrorRepeat=&bgHighlightRepeat=&bgContentRepeat=&bgHeaderRepeat=&bgActiveRepeat=&bgHoverRepeat=&bgDefaultRepeat=&iconsHover=url(%22images%2Fui-icons_555555_256x240.png%22)&iconsHighlight=url(%22images%2Fui-icons_777620_256x240.png%22)&iconsHeader=url(%22images%2Fui-icons_444444_256x240.png%22)&iconsError=url(%22images%2Fui-icons_cc0000_256x240.png%22)&iconsDefault=url(%22images%2Fui-icons_777777_256x240.png%22)&iconsContent=url(%22images%2Fui-icons_444444_256x240.png%22)&iconsActive=url(%22images%2Fui-icons_ffffff_256x240.png%22)&bgImgUrlShadow=&bgImgUrlOverlay=&bgImgUrlHover=&bgImgUrlHighlight=&bgImgUrlHeader=&bgImgUrlError=&bgImgUrlDefault=&bgImgUrlContent=&bgImgUrlActive=&opacityFilterShadow=Alpha(Opacity%3D30)&opacityFilterOverlay=Alpha(Opacity%3D30)&opacityShadowPerc=30&opacityOverlayPerc=30&iconColorHover=%23555555&iconColorHighlight=%23777620&iconColorHeader=%23444444&iconColorError=%23cc0000&iconColorDefault=%23777777&iconColorContent=%23444444&iconColorActive=%23ffffff&bgImgOpacityShadow=0&bgImgOpacityOverlay=0&bgImgOpacityError=95&bgImgOpacityHighlight=55&bgImgOpacityContent=75&bgImgOpacityHeader=75&bgImgOpacityActive=65&bgImgOpacityHover=75&bgImgOpacityDefault=75&bgTextureShadow=flat&bgTextureOverlay=flat&bgTextureError=flat&bgTextureHighlight=flat&bgTextureContent=flat&bgTextureHeader=flat&bgTextureActive=flat&bgTextureHover=flat&bgTextureDefault=flat&cornerRadius=3px&fwDefault=normal&ffDefault=Arial%2CHelvetica%2Csans-serif&fsDefault=1em&cornerRadiusShadow=8px&thicknessShadow=5px&offsetLeftShadow=0px&offsetTopShadow=0px&opacityShadow=.3&bgColorShadow=%23666666&opacityOverlay=.3&bgColorOverlay=%23aaaaaa&fcError=%235f3f3f&borderColorError=%23f1a899&bgColorError=%23fddfdf&fcHighlight=%23777620&borderColorHighlight=%23dad55e&bgColorHighlight=%23fffa90&fcContent=%23333333&borderColorContent=%23dddddd&bgColorContent=%23ffffff&fcHeader=%23333333&borderColorHeader=%23dddddd&bgColorHeader=%23e9e9e9&fcActive=%23ffffff&borderColorActive=%23003eff&bgColorActive=%23007fff&fcHover=%232b2b2b&borderColorHover=%23cccccc&bgColorHover=%23ededed&fcDefault=%23454545&borderColorDefault=%23c5c5c5&bgColorDefault=%23f6f6f6 +* Includes: draggable.css, core.css, resizable.css, selectable.css, sortable.css, accordion.css, autocomplete.css, menu.css, button.css, controlgroup.css, checkboxradio.css, datepicker.css, dialog.css, progressbar.css, selectmenu.css, slider.css, spinner.css, tabs.css, tooltip.css, theme.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?scope=&folderName=custom-theme&bgImgOpacityError=&bgImgOpacityHighlight=&bgImgOpacityActive=&bgImgOpacityHover=&bgImgOpacityDefault=&bgImgOpacityContent=&bgImgOpacityHeader=&cornerRadiusShadow=8px&offsetLeftShadow=0px&offsetTopShadow=0px&thicknessShadow=5px&opacityShadow=30&bgImgOpacityShadow=0&bgTextureShadow=flat&bgColorShadow=%23666666&opacityOverlay=30&bgImgOpacityOverlay=0&bgTextureOverlay=flat&bgColorOverlay=%23aaaaaa&iconColorError=%23cc0000&fcError=%235f3f3f&borderColorError=%23f1a899&bgTextureError=flat&bgColorError=%23fddfdf&iconColorHighlight=%23777620&fcHighlight=%23777620&borderColorHighlight=%23dad55e&bgTextureHighlight=flat&bgColorHighlight=%23fffa90&iconColorActive=%23ffffff&fcActive=%23ffffff&borderColorActive=%23000000&bgTextureActive=flat&bgColorActive=%23BBBBBB&iconColorHover=%23555555&fcHover=%232b2b2b&borderColorHover=%23cccccc&bgTextureHover=flat&bgColorHover=%23ededed&iconColorDefault=%23777777&fcDefault=%23454545&borderColorDefault=%23c5c5c5&bgTextureDefault=flat&bgColorDefault=%23f6f6f6&iconColorContent=%23444444&fcContent=%23333333&borderColorContent=%23dddddd&bgTextureContent=flat&bgColorContent=%23ffffff&iconColorHeader=%23ffffff&fcHeader=%23ffffff&borderColorHeader=%23dddddd&bgTextureHeader=flat&bgColorHeader=%235bb75b&cornerRadius=3px&fwDefault=normal&fsDefault=1em&ffDefault=Arial%2CHelvetica%2Csans-serif * Copyright jQuery Foundation and other contributors; Licensed MIT */ +.ui-draggable-handle { + -ms-touch-action: none; + touch-action: none; +} + /* Layout helpers ----------------------------------*/ .ui-helper-hidden { display: none; } + .ui-helper-hidden-accessible { border: 0; clip: rect(0 0 0 0); @@ -19,6 +25,7 @@ position: absolute; width: 1px; } + .ui-helper-reset { margin: 0; padding: 0; @@ -29,15 +36,18 @@ font-size: 100%; list-style: none; } + .ui-helper-clearfix:before, .ui-helper-clearfix:after { content: ""; display: table; border-collapse: collapse; } + .ui-helper-clearfix:after { clear: both; } + .ui-helper-zfix { width: 100%; height: 100%; @@ -45,14 +55,13 @@ left: 0; position: absolute; opacity: 0; - -ms-filter: "alpha(opacity=0)"; /* support: IE8 */ + filter: Alpha(Opacity=0); /* support: IE8 */ } .ui-front { z-index: 100; } - /* Interaction Cues ----------------------------------*/ .ui-state-disabled { @@ -60,7 +69,6 @@ pointer-events: none; } - /* Icons ----------------------------------*/ .ui-icon { @@ -90,6 +98,104 @@ width: 100%; height: 100%; } + +.ui-resizable { + position: relative; +} + +.ui-resizable-handle { + position: absolute; + font-size: 0.1px; + display: block; + -ms-touch-action: none; + touch-action: none; +} + +.ui-resizable-disabled .ui-resizable-handle, +.ui-resizable-autohide .ui-resizable-handle { + display: none; +} + +.ui-resizable-n { + cursor: n-resize; + height: 7px; + width: 100%; + top: -5px; + left: 0; +} + +.ui-resizable-s { + cursor: s-resize; + height: 7px; + width: 100%; + bottom: -5px; + left: 0; +} + +.ui-resizable-e { + cursor: e-resize; + width: 7px; + right: -5px; + top: 0; + height: 100%; +} + +.ui-resizable-w { + cursor: w-resize; + width: 7px; + left: -5px; + top: 0; + height: 100%; +} + +.ui-resizable-se { + cursor: se-resize; + width: 12px; + height: 12px; + right: 1px; + bottom: 1px; +} + +.ui-resizable-sw { + cursor: sw-resize; + width: 9px; + height: 9px; + left: -5px; + bottom: -5px; +} + +.ui-resizable-nw { + cursor: nw-resize; + width: 9px; + height: 9px; + left: -5px; + top: -5px; +} + +.ui-resizable-ne { + cursor: ne-resize; + width: 9px; + height: 9px; + right: -5px; + top: -5px; +} + +.ui-selectable { + -ms-touch-action: none; + touch-action: none; +} + +.ui-selectable-helper { + position: absolute; + z-index: 100; + border: 1px dotted black; +} + +.ui-sortable-handle { + -ms-touch-action: none; + touch-action: none; +} + .ui-accordion .ui-accordion-header { display: block; cursor: pointer; @@ -98,17 +204,20 @@ padding: .5em .5em .5em .7em; font-size: 100%; } + .ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; overflow: auto; } + .ui-autocomplete { position: absolute; top: 0; left: 0; cursor: default; } + .ui-menu { list-style: none; padding: 0; @@ -116,19 +225,23 @@ display: block; outline: 0; } + .ui-menu .ui-menu { position: absolute; } + .ui-menu .ui-menu-item { margin: 0; cursor: pointer; /* support: IE10, see #8844 */ list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"); } + .ui-menu .ui-menu-item-wrapper { position: relative; padding: 3px 1em 3px .4em; } + .ui-menu .ui-menu-divider { margin: 5px 0; height: 0; @@ -136,6 +249,7 @@ line-height: 0; border-width: 1px 0 0 0; } + .ui-menu .ui-state-focus, .ui-menu .ui-state-active { margin: -1px; @@ -145,6 +259,7 @@ .ui-menu-icons { position: relative; } + .ui-menu-icons .ui-menu-item-wrapper { padding-left: 2em; } @@ -163,6 +278,7 @@ left: auto; right: 0; } + .ui-button { padding: .4em 1em; display: inline-block; @@ -235,19 +351,23 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } + .ui-controlgroup { vertical-align: middle; display: inline-block; } + .ui-controlgroup > .ui-controlgroup-item { float: left; margin-left: 0; margin-right: 0; } + .ui-controlgroup > .ui-controlgroup-item:focus, .ui-controlgroup > .ui-controlgroup-item.ui-visual-focus { z-index: 9999; } + .ui-controlgroup-vertical > .ui-controlgroup-item { display: block; float: none; @@ -256,24 +376,31 @@ button.ui-button::-moz-focus-inner { margin-bottom: 0; text-align: left; } + .ui-controlgroup-vertical .ui-controlgroup-item { box-sizing: border-box; } + .ui-controlgroup .ui-controlgroup-label { padding: .4em 1em; } + .ui-controlgroup .ui-controlgroup-label span { font-size: 80%; } + .ui-controlgroup-horizontal .ui-controlgroup-label + .ui-controlgroup-item { border-left: none; } + .ui-controlgroup-vertical .ui-controlgroup-label + .ui-controlgroup-item { border-top: none; } + .ui-controlgroup-horizontal .ui-controlgroup-label.ui-widget-content { border-right: none; } + .ui-controlgroup-vertical .ui-controlgroup-label.ui-widget-content { border-bottom: none; } @@ -283,8 +410,9 @@ button.ui-button::-moz-focus-inner { /* Support: IE8 only, Android < 4.4 only */ width: 75%; - width: calc( 100% - 2.4em ); + width: calc(100% - 2.4em); } + .ui-controlgroup-vertical .ui-spinner .ui-spinner-up { border-top-style: solid; } @@ -294,6 +422,7 @@ button.ui-button::-moz-focus-inner { border-radius: .12em; border: none; } + .ui-checkboxradio-radio-label .ui-icon-background { width: 16px; height: 16px; @@ -301,6 +430,7 @@ button.ui-button::-moz-focus-inner { overflow: visible; border: none; } + .ui-checkboxradio-radio-label.ui-checkboxradio-checked .ui-icon, .ui-checkboxradio-radio-label.ui-checkboxradio-checked:hover .ui-icon { background-image: none; @@ -309,18 +439,22 @@ button.ui-button::-moz-focus-inner { border-width: 4px; border-style: solid; } + .ui-checkboxradio-disabled { pointer-events: none; } + .ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; } + .ui-datepicker .ui-datepicker-header { position: relative; padding: .2em 0; } + .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position: absolute; @@ -328,22 +462,28 @@ button.ui-button::-moz-focus-inner { width: 1.8em; height: 1.8em; } + .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } + .ui-datepicker .ui-datepicker-prev { left: 2px; } + .ui-datepicker .ui-datepicker-next { right: 2px; } + .ui-datepicker .ui-datepicker-prev-hover { left: 1px; } + .ui-datepicker .ui-datepicker-next-hover { right: 1px; } + .ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; @@ -353,35 +493,42 @@ button.ui-button::-moz-focus-inner { top: 50%; margin-top: -8px; } + .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } + .ui-datepicker .ui-datepicker-title select { font-size: 1em; margin: 1px 0; } + .ui-datepicker select.ui-datepicker-month, .ui-datepicker select.ui-datepicker-year { width: 45%; } + .ui-datepicker table { width: 100%; font-size: .9em; border-collapse: collapse; margin: 0 0 .4em; } + .ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } + .ui-datepicker td { border: 0; padding: 1px; } + .ui-datepicker td span, .ui-datepicker td a { display: block; @@ -389,6 +536,7 @@ button.ui-button::-moz-focus-inner { text-align: right; text-decoration: none; } + .ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; @@ -397,6 +545,7 @@ button.ui-button::-moz-focus-inner { border-right: 0; border-bottom: 0; } + .ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; @@ -405,6 +554,7 @@ button.ui-button::-moz-focus-inner { width: auto; overflow: visible; } + .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float: left; } @@ -413,29 +563,37 @@ button.ui-button::-moz-focus-inner { .ui-datepicker.ui-datepicker-multi { width: auto; } + .ui-datepicker-multi .ui-datepicker-group { float: left; } + .ui-datepicker-multi .ui-datepicker-group table { width: 95%; margin: 0 auto .4em; } + .ui-datepicker-multi-2 .ui-datepicker-group { width: 50%; } + .ui-datepicker-multi-3 .ui-datepicker-group { width: 33.3%; } + .ui-datepicker-multi-4 .ui-datepicker-group { width: 25%; } + .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header, .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width: 0; } + .ui-datepicker-multi .ui-datepicker-buttonpane { clear: left; } + .ui-datepicker-row-break { clear: both; width: 100%; @@ -446,32 +604,40 @@ button.ui-button::-moz-focus-inner { .ui-datepicker-rtl { direction: rtl; } + .ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } + .ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } + .ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } + .ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } + .ui-datepicker-rtl .ui-datepicker-buttonpane { clear: right; } + .ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } + .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current, .ui-datepicker-rtl .ui-datepicker-group { float: right; } + .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header, .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width: 0; @@ -487,6 +653,7 @@ button.ui-button::-moz-focus-inner { left: .5em; top: .3em; } + .ui-dialog { position: absolute; top: 0; @@ -494,10 +661,12 @@ button.ui-button::-moz-focus-inner { padding: .2em; outline: 0; } + .ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; } + .ui-dialog .ui-dialog-title { float: left; margin: .1em 0; @@ -506,6 +675,7 @@ button.ui-button::-moz-focus-inner { overflow: hidden; text-overflow: ellipsis; } + .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; @@ -515,6 +685,7 @@ button.ui-button::-moz-focus-inner { padding: 1px; height: 20px; } + .ui-dialog .ui-dialog-content { position: relative; border: 0; @@ -522,6 +693,7 @@ button.ui-button::-moz-focus-inner { background: none; overflow: auto; } + .ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; @@ -529,29 +701,36 @@ button.ui-button::-moz-focus-inner { margin-top: .5em; padding: .3em 1em .5em .4em; } + .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } + .ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; } + .ui-dialog .ui-resizable-n { height: 2px; top: 0; } + .ui-dialog .ui-resizable-e { width: 2px; right: 0; } + .ui-dialog .ui-resizable-s { height: 2px; bottom: 0; } + .ui-dialog .ui-resizable-w { width: 2px; left: 0; } + .ui-dialog .ui-resizable-se, .ui-dialog .ui-resizable-sw, .ui-dialog .ui-resizable-ne, @@ -559,139 +738,68 @@ button.ui-button::-moz-focus-inner { width: 7px; height: 7px; } + .ui-dialog .ui-resizable-se { right: 0; bottom: 0; } + .ui-dialog .ui-resizable-sw { left: 0; bottom: 0; } + .ui-dialog .ui-resizable-ne { right: 0; top: 0; } + .ui-dialog .ui-resizable-nw { left: 0; top: 0; } + .ui-draggable .ui-dialog-titlebar { cursor: move; } -.ui-draggable-handle { - -ms-touch-action: none; - touch-action: none; -} -.ui-resizable { - position: relative; -} -.ui-resizable-handle { - position: absolute; - font-size: 0.1px; - display: block; - -ms-touch-action: none; - touch-action: none; + +.ui-progressbar { + height: 2em; + text-align: left; + overflow: hidden; } -.ui-resizable-disabled .ui-resizable-handle, -.ui-resizable-autohide .ui-resizable-handle { - display: none; + +.ui-progressbar .ui-progressbar-value { + margin: -1px; + height: 100%; } -.ui-resizable-n { - cursor: n-resize; - height: 7px; - width: 100%; - top: -5px; - left: 0; + +.ui-progressbar .ui-progressbar-overlay { + background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw=="); + height: 100%; + filter: alpha(opacity=25); /* support: IE8 */ + opacity: 0.25; } -.ui-resizable-s { - cursor: s-resize; - height: 7px; - width: 100%; - bottom: -5px; - left: 0; + +.ui-progressbar-indeterminate .ui-progressbar-value { + background-image: none; } -.ui-resizable-e { - cursor: e-resize; - width: 7px; - right: -5px; + +.ui-selectmenu-menu { + padding: 0; + margin: 0; + position: absolute; top: 0; - height: 100%; + left: 0; + display: none; } -.ui-resizable-w { - cursor: w-resize; - width: 7px; - left: -5px; - top: 0; - height: 100%; -} -.ui-resizable-se { - cursor: se-resize; - width: 12px; - height: 12px; - right: 1px; - bottom: 1px; -} -.ui-resizable-sw { - cursor: sw-resize; - width: 9px; - height: 9px; - left: -5px; - bottom: -5px; -} -.ui-resizable-nw { - cursor: nw-resize; - width: 9px; - height: 9px; - left: -5px; - top: -5px; -} -.ui-resizable-ne { - cursor: ne-resize; - width: 9px; - height: 9px; - right: -5px; - top: -5px; -} -.ui-progressbar { - height: 2em; - text-align: left; - overflow: hidden; -} -.ui-progressbar .ui-progressbar-value { - margin: -1px; - height: 100%; -} -.ui-progressbar .ui-progressbar-overlay { - background: url("data:image/gif;base64,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"); - height: 100%; - -ms-filter: "alpha(opacity=25)"; /* support: IE8 */ - opacity: 0.25; -} -.ui-progressbar-indeterminate .ui-progressbar-value { - background-image: none; -} -.ui-selectable { - -ms-touch-action: none; - touch-action: none; -} -.ui-selectable-helper { - position: absolute; - z-index: 100; - border: 1px dotted black; -} -.ui-selectmenu-menu { - padding: 0; - margin: 0; - position: absolute; - top: 0; - left: 0; - display: none; -} -.ui-selectmenu-menu .ui-menu { - overflow: auto; - overflow-x: hidden; - padding-bottom: 1px; + +.ui-selectmenu-menu .ui-menu { + overflow: auto; + overflow-x: hidden; + padding-bottom: 1px; } + .ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup { font-size: 1em; font-weight: bold; @@ -701,37 +809,44 @@ button.ui-button::-moz-focus-inner { height: auto; border: 0; } + .ui-selectmenu-open { display: block; } + .ui-selectmenu-text { display: block; margin-right: 20px; overflow: hidden; text-overflow: ellipsis; } + .ui-selectmenu-button.ui-button { text-align: left; white-space: nowrap; width: 14em; } + .ui-selectmenu-icon.ui-icon { float: right; margin-top: 0; } + .ui-slider { position: relative; text-align: left; } + .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; - cursor: pointer; + cursor: default; -ms-touch-action: none; touch-action: none; } + .ui-slider .ui-slider-range { position: absolute; z-index: 1; @@ -750,17 +865,21 @@ button.ui-button::-moz-focus-inner { .ui-slider-horizontal { height: .8em; } + .ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } + .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } + .ui-slider-horizontal .ui-slider-range-min { left: 0; } + .ui-slider-horizontal .ui-slider-range-max { right: 0; } @@ -769,25 +888,26 @@ button.ui-button::-moz-focus-inner { width: .8em; height: 100px; } + .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } + .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } + .ui-slider-vertical .ui-slider-range-min { bottom: 0; } + .ui-slider-vertical .ui-slider-range-max { top: 0; } -.ui-sortable-handle { - -ms-touch-action: none; - touch-action: none; -} + .ui-spinner { position: relative; display: inline-block; @@ -795,6 +915,7 @@ button.ui-button::-moz-focus-inner { padding: 0; vertical-align: middle; } + .ui-spinner-input { border: none; background: none; @@ -805,6 +926,7 @@ button.ui-button::-moz-focus-inner { margin-left: .4em; margin-right: 2em; } + .ui-spinner-button { width: 1.6em; height: 50%; @@ -818,26 +940,32 @@ button.ui-button::-moz-focus-inner { overflow: hidden; right: 0; } + /* more specificity required here to override default borders */ .ui-spinner a.ui-spinner-button { border-top-style: none; border-bottom-style: none; border-right-style: none; } + .ui-spinner-up { top: 0; } + .ui-spinner-down { bottom: 0; } + .ui-tabs { - position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ + position: relative; /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ padding: .2em; } + .ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } + .ui-tabs .ui-tabs-nav li { list-style: none; float: left; @@ -848,35 +976,42 @@ button.ui-button::-moz-focus-inner { padding: 0; white-space: nowrap; } + .ui-tabs .ui-tabs-nav .ui-tabs-anchor { float: left; padding: .5em 1em; text-decoration: none; } + .ui-tabs .ui-tabs-nav li.ui-tabs-active { margin-bottom: -1px; padding-bottom: 1px; } + .ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor, .ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor, .ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor { cursor: text; } + .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor { cursor: pointer; } + .ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } + .ui-tooltip { padding: 8px; position: absolute; z-index: 9999; max-width: 300px; } + body .ui-tooltip { border-width: 2px; } @@ -884,38 +1019,45 @@ body .ui-tooltip { /* Component containers ----------------------------------*/ .ui-widget { - font-family: Arial,Helvetica,sans-serif; + font-family: Arial, Helvetica, sans-serif; font-size: 1em; } + .ui-widget .ui-widget { font-size: 1em; } + .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { - font-family: Arial,Helvetica,sans-serif; + font-family: Arial, Helvetica, sans-serif; font-size: 1em; } + .ui-widget.ui-widget-content { border: 1px solid #c5c5c5; } + .ui-widget-content { border: 1px solid #dddddd; background: #ffffff; color: #333333; } + .ui-widget-content a { color: #333333; } + .ui-widget-header { border: 1px solid #dddddd; - background: #e9e9e9; - color: #333333; + background: #5bb75b; + color: #ffffff; font-weight: bold; } + .ui-widget-header a { - color: #333333; + color: #ffffff; } /* Interaction states @@ -924,9 +1066,8 @@ body .ui-tooltip { .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default, .ui-button, - -/* We use html here because we need a greater specificity to make sure disabled -works properly when clicked or hovered */ + /* We use html here because we need a greater specificity to make sure disabled + works properly when clicked or hovered */ html .ui-button.ui-state-disabled:hover, html .ui-button.ui-state-disabled:active { border: 1px solid #c5c5c5; @@ -934,6 +1075,7 @@ html .ui-button.ui-state-disabled:active { font-weight: normal; color: #454545; } + .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited, @@ -944,6 +1086,7 @@ a:visited.ui-button, color: #454545; text-decoration: none; } + .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, @@ -957,6 +1100,7 @@ a:visited.ui-button, font-weight: normal; color: #2b2b2b; } + .ui-state-hover a, .ui-state-hover a:hover, .ui-state-hover a:link, @@ -974,22 +1118,25 @@ a.ui-button:focus { .ui-visual-focus { box-shadow: 0 0 3px 1px rgb(94, 158, 214); } + .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active, a.ui-button:active, .ui-button:active, .ui-button.ui-state-active:hover { - border: 1px solid #003eff; - background: #007fff; + border: 1px solid #000000; + background: #BBBBBB; font-weight: normal; color: #ffffff; } + .ui-icon-background, .ui-state-active .ui-icon-background { - border: #003eff; + border: #000000; background-color: #ffffff; } + .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { @@ -1006,15 +1153,18 @@ a.ui-button:active, background: #fffa90; color: #777620; } + .ui-state-checked { border: 1px solid #dad55e; background: #fffa90; } + .ui-state-highlight a, .ui-widget-content .ui-state-highlight a, .ui-widget-header .ui-state-highlight a { color: #777620; } + .ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error { @@ -1022,37 +1172,43 @@ a.ui-button:active, background: #fddfdf; color: #5f3f3f; } + .ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #5f3f3f; } + .ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #5f3f3f; } + .ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } + .ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; - -ms-filter: "alpha(opacity=70)"; /* support: IE8 */ + filter: Alpha(Opacity=70); /* support: IE8 */ font-weight: normal; } + .ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; - -ms-filter: "alpha(opacity=35)"; /* support: IE8 */ + filter: Alpha(Opacity=35); /* support: IE8 */ background-image: none; } + .ui-state-disabled .ui-icon { - -ms-filter: "alpha(opacity=35)"; /* support: IE8 - See #6059 */ + filter: Alpha(Opacity=35); /* support: IE8 - See #6059 */ } /* Icons @@ -1063,216 +1219,743 @@ a.ui-button:active, width: 16px; height: 16px; } + .ui-icon, .ui-widget-content .ui-icon { - background-image: url("images/ui-icons_444444_256x240.png"); + background-image: url("chrome-extension://__MSG_@@extension_id__/images/ui-icons_444444_256x240.png"); } + .ui-widget-header .ui-icon { - background-image: url("images/ui-icons_444444_256x240.png"); + background-image: url("chrome-extension://__MSG_@@extension_id__/images/ui-icons_ffffff_256x240.png"); } + .ui-state-hover .ui-icon, .ui-state-focus .ui-icon, .ui-button:hover .ui-icon, .ui-button:focus .ui-icon { - background-image: url("images/ui-icons_555555_256x240.png"); + background-image: url("chrome-extension://__MSG_@@extension_id__/images/ui-icons_555555_256x240.png"); } + .ui-state-active .ui-icon, .ui-button:active .ui-icon { - background-image: url("images/ui-icons_ffffff_256x240.png"); + background-image: url("chrome-extension://__MSG_@@extension_id__/images/ui-icons_ffffff_256x240.png"); } + .ui-state-highlight .ui-icon, .ui-button .ui-state-highlight.ui-icon { - background-image: url("images/ui-icons_777620_256x240.png"); + background-image: url("chrome-extension://__MSG_@@extension_id__/images/ui-icons_777620_256x240.png"); } + .ui-state-error .ui-icon, .ui-state-error-text .ui-icon { - background-image: url("images/ui-icons_cc0000_256x240.png"); + background-image: url("chrome-extension://__MSG_@@extension_id__/images/ui-icons_cc0000_256x240.png"); } + .ui-button .ui-icon { - background-image: url("images/ui-icons_777777_256x240.png"); + background-image: url("chrome-extension://__MSG_@@extension_id__/images/ui-icons_777777_256x240.png"); } /* positioning */ -/* Three classes needed to override `.ui-button:hover .ui-icon` */ -.ui-icon-blank.ui-icon-blank.ui-icon-blank { - background-image: none; +.ui-icon-blank { + background-position: 16px 16px; +} + +.ui-icon-caret-1-n { + background-position: 0 0; +} + +.ui-icon-caret-1-ne { + background-position: -16px 0; +} + +.ui-icon-caret-1-e { + background-position: -32px 0; +} + +.ui-icon-caret-1-se { + background-position: -48px 0; +} + +.ui-icon-caret-1-s { + background-position: -65px 0; +} + +.ui-icon-caret-1-sw { + background-position: -80px 0; +} + +.ui-icon-caret-1-w { + background-position: -96px 0; +} + +.ui-icon-caret-1-nw { + background-position: -112px 0; +} + +.ui-icon-caret-2-n-s { + background-position: -128px 0; +} + +.ui-icon-caret-2-e-w { + background-position: -144px 0; +} + +.ui-icon-triangle-1-n { + background-position: 0 -16px; +} + +.ui-icon-triangle-1-ne { + background-position: -16px -16px; +} + +.ui-icon-triangle-1-e { + background-position: -32px -16px; +} + +.ui-icon-triangle-1-se { + background-position: -48px -16px; +} + +.ui-icon-triangle-1-s { + background-position: -65px -16px; +} + +.ui-icon-triangle-1-sw { + background-position: -80px -16px; +} + +.ui-icon-triangle-1-w { + background-position: -96px -16px; +} + +.ui-icon-triangle-1-nw { + background-position: -112px -16px; +} + +.ui-icon-triangle-2-n-s { + background-position: -128px -16px; +} + +.ui-icon-triangle-2-e-w { + background-position: -144px -16px; +} + +.ui-icon-arrow-1-n { + background-position: 0 -32px; +} + +.ui-icon-arrow-1-ne { + background-position: -16px -32px; +} + +.ui-icon-arrow-1-e { + background-position: -32px -32px; +} + +.ui-icon-arrow-1-se { + background-position: -48px -32px; +} + +.ui-icon-arrow-1-s { + background-position: -65px -32px; +} + +.ui-icon-arrow-1-sw { + background-position: -80px -32px; +} + +.ui-icon-arrow-1-w { + background-position: -96px -32px; +} + +.ui-icon-arrow-1-nw { + background-position: -112px -32px; +} + +.ui-icon-arrow-2-n-s { + background-position: -128px -32px; +} + +.ui-icon-arrow-2-ne-sw { + background-position: -144px -32px; +} + +.ui-icon-arrow-2-e-w { + background-position: -160px -32px; +} + +.ui-icon-arrow-2-se-nw { + background-position: -176px -32px; +} + +.ui-icon-arrowstop-1-n { + background-position: -192px -32px; +} + +.ui-icon-arrowstop-1-e { + background-position: -208px -32px; +} + +.ui-icon-arrowstop-1-s { + background-position: -224px -32px; +} + +.ui-icon-arrowstop-1-w { + background-position: -240px -32px; +} + +.ui-icon-arrowthick-1-n { + background-position: 1px -48px; +} + +.ui-icon-arrowthick-1-ne { + background-position: -16px -48px; +} + +.ui-icon-arrowthick-1-e { + background-position: -32px -48px; +} + +.ui-icon-arrowthick-1-se { + background-position: -48px -48px; +} + +.ui-icon-arrowthick-1-s { + background-position: -64px -48px; +} + +.ui-icon-arrowthick-1-sw { + background-position: -80px -48px; +} + +.ui-icon-arrowthick-1-w { + background-position: -96px -48px; +} + +.ui-icon-arrowthick-1-nw { + background-position: -112px -48px; +} + +.ui-icon-arrowthick-2-n-s { + background-position: -128px -48px; +} + +.ui-icon-arrowthick-2-ne-sw { + background-position: -144px -48px; +} + +.ui-icon-arrowthick-2-e-w { + background-position: -160px -48px; +} + +.ui-icon-arrowthick-2-se-nw { + background-position: -176px -48px; +} + +.ui-icon-arrowthickstop-1-n { + background-position: -192px -48px; +} + +.ui-icon-arrowthickstop-1-e { + background-position: -208px -48px; +} + +.ui-icon-arrowthickstop-1-s { + background-position: -224px -48px; +} + +.ui-icon-arrowthickstop-1-w { + background-position: -240px -48px; +} + +.ui-icon-arrowreturnthick-1-w { + background-position: 0 -64px; +} + +.ui-icon-arrowreturnthick-1-n { + background-position: -16px -64px; +} + +.ui-icon-arrowreturnthick-1-e { + background-position: -32px -64px; +} + +.ui-icon-arrowreturnthick-1-s { + background-position: -48px -64px; +} + +.ui-icon-arrowreturn-1-w { + background-position: -64px -64px; +} + +.ui-icon-arrowreturn-1-n { + background-position: -80px -64px; +} + +.ui-icon-arrowreturn-1-e { + background-position: -96px -64px; +} + +.ui-icon-arrowreturn-1-s { + background-position: -112px -64px; +} + +.ui-icon-arrowrefresh-1-w { + background-position: -128px -64px; +} + +.ui-icon-arrowrefresh-1-n { + background-position: -144px -64px; +} + +.ui-icon-arrowrefresh-1-e { + background-position: -160px -64px; +} + +.ui-icon-arrowrefresh-1-s { + background-position: -176px -64px; +} + +.ui-icon-arrow-4 { + background-position: 0 -80px; +} + +.ui-icon-arrow-4-diag { + background-position: -16px -80px; +} + +.ui-icon-extlink { + background-position: -32px -80px; +} + +.ui-icon-newwin { + background-position: -48px -80px; +} + +.ui-icon-refresh { + background-position: -64px -80px; +} + +.ui-icon-shuffle { + background-position: -80px -80px; +} + +.ui-icon-transfer-e-w { + background-position: -96px -80px; +} + +.ui-icon-transferthick-e-w { + background-position: -112px -80px; +} + +.ui-icon-folder-collapsed { + background-position: 0 -96px; +} + +.ui-icon-folder-open { + background-position: -16px -96px; +} + +.ui-icon-document { + background-position: -32px -96px; +} + +.ui-icon-document-b { + background-position: -48px -96px; +} + +.ui-icon-note { + background-position: -64px -96px; +} + +.ui-icon-mail-closed { + background-position: -80px -96px; +} + +.ui-icon-mail-open { + background-position: -96px -96px; +} + +.ui-icon-suitcase { + background-position: -112px -96px; +} + +.ui-icon-comment { + background-position: -128px -96px; +} + +.ui-icon-person { + background-position: -144px -96px; +} + +.ui-icon-print { + background-position: -160px -96px; +} + +.ui-icon-trash { + background-position: -176px -96px; +} + +.ui-icon-locked { + background-position: -192px -96px; +} + +.ui-icon-unlocked { + background-position: -208px -96px; +} + +.ui-icon-bookmark { + background-position: -224px -96px; +} + +.ui-icon-tag { + background-position: -240px -96px; +} + +.ui-icon-home { + background-position: 0 -112px; +} + +.ui-icon-flag { + background-position: -16px -112px; +} + +.ui-icon-calendar { + background-position: -32px -112px; +} + +.ui-icon-cart { + background-position: -48px -112px; +} + +.ui-icon-pencil { + background-position: -64px -112px; +} + +.ui-icon-clock { + background-position: -80px -112px; +} + +.ui-icon-disk { + background-position: -96px -112px; +} + +.ui-icon-calculator { + background-position: -112px -112px; +} + +.ui-icon-zoomin { + background-position: -128px -112px; +} + +.ui-icon-zoomout { + background-position: -144px -112px; +} + +.ui-icon-search { + background-position: -160px -112px; +} + +.ui-icon-wrench { + background-position: -176px -112px; +} + +.ui-icon-gear { + background-position: -192px -112px; +} + +.ui-icon-heart { + background-position: -208px -112px; +} + +.ui-icon-star { + background-position: -224px -112px; +} + +.ui-icon-link { + background-position: -240px -112px; +} + +.ui-icon-cancel { + background-position: 0 -128px; +} + +.ui-icon-plus { + background-position: -16px -128px; +} + +.ui-icon-plusthick { + background-position: -32px -128px; +} + +.ui-icon-minus { + background-position: -48px -128px; +} + +.ui-icon-minusthick { + background-position: -64px -128px; +} + +.ui-icon-close { + background-position: -80px -128px; +} + +.ui-icon-closethick { + background-position: -96px -128px; +} + +.ui-icon-key { + background-position: -112px -128px; +} + +.ui-icon-lightbulb { + background-position: -128px -128px; +} + +.ui-icon-scissors { + background-position: -144px -128px; } -.ui-icon-caret-1-n { background-position: 0 0; } -.ui-icon-caret-1-ne { background-position: -16px 0; } -.ui-icon-caret-1-e { background-position: -32px 0; } -.ui-icon-caret-1-se { background-position: -48px 0; } -.ui-icon-caret-1-s { background-position: -65px 0; } -.ui-icon-caret-1-sw { background-position: -80px 0; } -.ui-icon-caret-1-w { background-position: -96px 0; } -.ui-icon-caret-1-nw { background-position: -112px 0; } -.ui-icon-caret-2-n-s { background-position: -128px 0; } -.ui-icon-caret-2-e-w { background-position: -144px 0; } -.ui-icon-triangle-1-n { background-position: 0 -16px; } -.ui-icon-triangle-1-ne { background-position: -16px -16px; } -.ui-icon-triangle-1-e { background-position: -32px -16px; } -.ui-icon-triangle-1-se { background-position: -48px -16px; } -.ui-icon-triangle-1-s { background-position: -65px -16px; } -.ui-icon-triangle-1-sw { background-position: -80px -16px; } -.ui-icon-triangle-1-w { background-position: -96px -16px; } -.ui-icon-triangle-1-nw { background-position: -112px -16px; } -.ui-icon-triangle-2-n-s { background-position: -128px -16px; } -.ui-icon-triangle-2-e-w { background-position: -144px -16px; } -.ui-icon-arrow-1-n { background-position: 0 -32px; } -.ui-icon-arrow-1-ne { background-position: -16px -32px; } -.ui-icon-arrow-1-e { background-position: -32px -32px; } -.ui-icon-arrow-1-se { background-position: -48px -32px; } -.ui-icon-arrow-1-s { background-position: -65px -32px; } -.ui-icon-arrow-1-sw { background-position: -80px -32px; } -.ui-icon-arrow-1-w { background-position: -96px -32px; } -.ui-icon-arrow-1-nw { background-position: -112px -32px; } -.ui-icon-arrow-2-n-s { background-position: -128px -32px; } -.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } -.ui-icon-arrow-2-e-w { background-position: -160px -32px; } -.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } -.ui-icon-arrowstop-1-n { background-position: -192px -32px; } -.ui-icon-arrowstop-1-e { background-position: -208px -32px; } -.ui-icon-arrowstop-1-s { background-position: -224px -32px; } -.ui-icon-arrowstop-1-w { background-position: -240px -32px; } -.ui-icon-arrowthick-1-n { background-position: 1px -48px; } -.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } -.ui-icon-arrowthick-1-e { background-position: -32px -48px; } -.ui-icon-arrowthick-1-se { background-position: -48px -48px; } -.ui-icon-arrowthick-1-s { background-position: -64px -48px; } -.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } -.ui-icon-arrowthick-1-w { background-position: -96px -48px; } -.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } -.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } -.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } -.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } -.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } -.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } -.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } -.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } -.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } -.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } -.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } -.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } -.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } -.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } -.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } -.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } -.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } -.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } -.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } -.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } -.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } -.ui-icon-arrow-4 { background-position: 0 -80px; } -.ui-icon-arrow-4-diag { background-position: -16px -80px; } -.ui-icon-extlink { background-position: -32px -80px; } -.ui-icon-newwin { background-position: -48px -80px; } -.ui-icon-refresh { background-position: -64px -80px; } -.ui-icon-shuffle { background-position: -80px -80px; } -.ui-icon-transfer-e-w { background-position: -96px -80px; } -.ui-icon-transferthick-e-w { background-position: -112px -80px; } -.ui-icon-folder-collapsed { background-position: 0 -96px; } -.ui-icon-folder-open { background-position: -16px -96px; } -.ui-icon-document { background-position: -32px -96px; } -.ui-icon-document-b { background-position: -48px -96px; } -.ui-icon-note { background-position: -64px -96px; } -.ui-icon-mail-closed { background-position: -80px -96px; } -.ui-icon-mail-open { background-position: -96px -96px; } -.ui-icon-suitcase { background-position: -112px -96px; } -.ui-icon-comment { background-position: -128px -96px; } -.ui-icon-person { background-position: -144px -96px; } -.ui-icon-print { background-position: -160px -96px; } -.ui-icon-trash { background-position: -176px -96px; } -.ui-icon-locked { background-position: -192px -96px; } -.ui-icon-unlocked { background-position: -208px -96px; } -.ui-icon-bookmark { background-position: -224px -96px; } -.ui-icon-tag { background-position: -240px -96px; } -.ui-icon-home { background-position: 0 -112px; } -.ui-icon-flag { background-position: -16px -112px; } -.ui-icon-calendar { background-position: -32px -112px; } -.ui-icon-cart { background-position: -48px -112px; } -.ui-icon-pencil { background-position: -64px -112px; } -.ui-icon-clock { background-position: -80px -112px; } -.ui-icon-disk { background-position: -96px -112px; } -.ui-icon-calculator { background-position: -112px -112px; } -.ui-icon-zoomin { background-position: -128px -112px; } -.ui-icon-zoomout { background-position: -144px -112px; } -.ui-icon-search { background-position: -160px -112px; } -.ui-icon-wrench { background-position: -176px -112px; } -.ui-icon-gear { background-position: -192px -112px; } -.ui-icon-heart { background-position: -208px -112px; } -.ui-icon-star { background-position: -224px -112px; } -.ui-icon-link { background-position: -240px -112px; } -.ui-icon-cancel { background-position: 0 -128px; } -.ui-icon-plus { background-position: -16px -128px; } -.ui-icon-plusthick { background-position: -32px -128px; } -.ui-icon-minus { background-position: -48px -128px; } -.ui-icon-minusthick { background-position: -64px -128px; } -.ui-icon-close { background-position: -80px -128px; } -.ui-icon-closethick { background-position: -96px -128px; } -.ui-icon-key { background-position: -112px -128px; } -.ui-icon-lightbulb { background-position: -128px -128px; } -.ui-icon-scissors { background-position: -144px -128px; } -.ui-icon-clipboard { background-position: -160px -128px; } -.ui-icon-copy { background-position: -176px -128px; } -.ui-icon-contact { background-position: -192px -128px; } -.ui-icon-image { background-position: -208px -128px; } -.ui-icon-video { background-position: -224px -128px; } -.ui-icon-script { background-position: -240px -128px; } -.ui-icon-alert { background-position: 0 -144px; } -.ui-icon-info { background-position: -16px -144px; } -.ui-icon-notice { background-position: -32px -144px; } -.ui-icon-help { background-position: -48px -144px; } -.ui-icon-check { background-position: -64px -144px; } -.ui-icon-bullet { background-position: -80px -144px; } -.ui-icon-radio-on { background-position: -96px -144px; } -.ui-icon-radio-off { background-position: -112px -144px; } -.ui-icon-pin-w { background-position: -128px -144px; } -.ui-icon-pin-s { background-position: -144px -144px; } -.ui-icon-play { background-position: 0 -160px; } -.ui-icon-pause { background-position: -16px -160px; } -.ui-icon-seek-next { background-position: -32px -160px; } -.ui-icon-seek-prev { background-position: -48px -160px; } -.ui-icon-seek-end { background-position: -64px -160px; } -.ui-icon-seek-start { background-position: -80px -160px; } + +.ui-icon-clipboard { + background-position: -160px -128px; +} + +.ui-icon-copy { + background-position: -176px -128px; +} + +.ui-icon-contact { + background-position: -192px -128px; +} + +.ui-icon-image { + background-position: -208px -128px; +} + +.ui-icon-video { + background-position: -224px -128px; +} + +.ui-icon-script { + background-position: -240px -128px; +} + +.ui-icon-alert { + background-position: 0 -144px; +} + +.ui-icon-info { + background-position: -16px -144px; +} + +.ui-icon-notice { + background-position: -32px -144px; +} + +.ui-icon-help { + background-position: -48px -144px; +} + +.ui-icon-check { + background-position: -64px -144px; +} + +.ui-icon-bullet { + background-position: -80px -144px; +} + +.ui-icon-radio-on { + background-position: -96px -144px; +} + +.ui-icon-radio-off { + background-position: -112px -144px; +} + +.ui-icon-pin-w { + background-position: -128px -144px; +} + +.ui-icon-pin-s { + background-position: -144px -144px; +} + +.ui-icon-play { + background-position: 0 -160px; +} + +.ui-icon-pause { + background-position: -16px -160px; +} + +.ui-icon-seek-next { + background-position: -32px -160px; +} + +.ui-icon-seek-prev { + background-position: -48px -160px; +} + +.ui-icon-seek-end { + background-position: -64px -160px; +} + +.ui-icon-seek-start { + background-position: -80px -160px; +} + /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ -.ui-icon-seek-first { background-position: -80px -160px; } -.ui-icon-stop { background-position: -96px -160px; } -.ui-icon-eject { background-position: -112px -160px; } -.ui-icon-volume-off { background-position: -128px -160px; } -.ui-icon-volume-on { background-position: -144px -160px; } -.ui-icon-power { background-position: 0 -176px; } -.ui-icon-signal-diag { background-position: -16px -176px; } -.ui-icon-signal { background-position: -32px -176px; } -.ui-icon-battery-0 { background-position: -48px -176px; } -.ui-icon-battery-1 { background-position: -64px -176px; } -.ui-icon-battery-2 { background-position: -80px -176px; } -.ui-icon-battery-3 { background-position: -96px -176px; } -.ui-icon-circle-plus { background-position: 0 -192px; } -.ui-icon-circle-minus { background-position: -16px -192px; } -.ui-icon-circle-close { background-position: -32px -192px; } -.ui-icon-circle-triangle-e { background-position: -48px -192px; } -.ui-icon-circle-triangle-s { background-position: -64px -192px; } -.ui-icon-circle-triangle-w { background-position: -80px -192px; } -.ui-icon-circle-triangle-n { background-position: -96px -192px; } -.ui-icon-circle-arrow-e { background-position: -112px -192px; } -.ui-icon-circle-arrow-s { background-position: -128px -192px; } -.ui-icon-circle-arrow-w { background-position: -144px -192px; } -.ui-icon-circle-arrow-n { background-position: -160px -192px; } -.ui-icon-circle-zoomin { background-position: -176px -192px; } -.ui-icon-circle-zoomout { background-position: -192px -192px; } -.ui-icon-circle-check { background-position: -208px -192px; } -.ui-icon-circlesmall-plus { background-position: 0 -208px; } -.ui-icon-circlesmall-minus { background-position: -16px -208px; } -.ui-icon-circlesmall-close { background-position: -32px -208px; } -.ui-icon-squaresmall-plus { background-position: -48px -208px; } -.ui-icon-squaresmall-minus { background-position: -64px -208px; } -.ui-icon-squaresmall-close { background-position: -80px -208px; } -.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } -.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } -.ui-icon-grip-solid-vertical { background-position: -32px -224px; } -.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } -.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } -.ui-icon-grip-diagonal-se { background-position: -80px -224px; } +.ui-icon-seek-first { + background-position: -80px -160px; +} +.ui-icon-stop { + background-position: -96px -160px; +} + +.ui-icon-eject { + background-position: -112px -160px; +} + +.ui-icon-volume-off { + background-position: -128px -160px; +} + +.ui-icon-volume-on { + background-position: -144px -160px; +} + +.ui-icon-power { + background-position: 0 -176px; +} + +.ui-icon-signal-diag { + background-position: -16px -176px; +} + +.ui-icon-signal { + background-position: -32px -176px; +} + +.ui-icon-battery-0 { + background-position: -48px -176px; +} + +.ui-icon-battery-1 { + background-position: -64px -176px; +} + +.ui-icon-battery-2 { + background-position: -80px -176px; +} + +.ui-icon-battery-3 { + background-position: -96px -176px; +} + +.ui-icon-circle-plus { + background-position: 0 -192px; +} + +.ui-icon-circle-minus { + background-position: -16px -192px; +} + +.ui-icon-circle-close { + background-position: -32px -192px; +} + +.ui-icon-circle-triangle-e { + background-position: -48px -192px; +} + +.ui-icon-circle-triangle-s { + background-position: -64px -192px; +} + +.ui-icon-circle-triangle-w { + background-position: -80px -192px; +} + +.ui-icon-circle-triangle-n { + background-position: -96px -192px; +} + +.ui-icon-circle-arrow-e { + background-position: -112px -192px; +} + +.ui-icon-circle-arrow-s { + background-position: -128px -192px; +} + +.ui-icon-circle-arrow-w { + background-position: -144px -192px; +} + +.ui-icon-circle-arrow-n { + background-position: -160px -192px; +} + +.ui-icon-circle-zoomin { + background-position: -176px -192px; +} + +.ui-icon-circle-zoomout { + background-position: -192px -192px; +} + +.ui-icon-circle-check { + background-position: -208px -192px; +} + +.ui-icon-circlesmall-plus { + background-position: 0 -208px; +} + +.ui-icon-circlesmall-minus { + background-position: -16px -208px; +} + +.ui-icon-circlesmall-close { + background-position: -32px -208px; +} + +.ui-icon-squaresmall-plus { + background-position: -48px -208px; +} + +.ui-icon-squaresmall-minus { + background-position: -64px -208px; +} + +.ui-icon-squaresmall-close { + background-position: -80px -208px; +} + +.ui-icon-grip-dotted-vertical { + background-position: 0 -224px; +} + +.ui-icon-grip-dotted-horizontal { + background-position: -16px -224px; +} + +.ui-icon-grip-solid-vertical { + background-position: -32px -224px; +} + +.ui-icon-grip-solid-horizontal { + background-position: -48px -224px; +} + +.ui-icon-gripsmall-diagonal-se { + background-position: -64px -224px; +} + +.ui-icon-grip-diagonal-se { + background-position: -80px -224px; +} /* Misc visuals ----------------------------------*/ @@ -1284,18 +1967,21 @@ a.ui-button:active, .ui-corner-tl { border-top-left-radius: 3px; } + .ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { border-top-right-radius: 3px; } + .ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { border-bottom-left-radius: 3px; } + .ui-corner-all, .ui-corner-bottom, .ui-corner-right, @@ -1306,9 +1992,10 @@ a.ui-button:active, /* Overlays */ .ui-widget-overlay { background: #aaaaaa; - opacity: .003; - -ms-filter: Alpha(Opacity=.3); /* support: IE8 */ + opacity: .3; + filter: Alpha(Opacity=30); /* support: IE8 */ } + .ui-widget-shadow { -webkit-box-shadow: 0px 0px 5px #666666; box-shadow: 0px 0px 5px #666666; diff --git a/dist/manifest.json b/dist/manifest.json index 48d62356..1710896a 100644 --- a/dist/manifest.json +++ b/dist/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "SaltBot", "description": "This extension automates betting on SaltyBet.com.", - "version": "2.6.7", + "version": "2.7.0", "permissions": [ "storage", "unlimitedStorage", diff --git a/dist/popup.html b/dist/popup.html index e5563a51..f6a1f266 100644 --- a/dist/popup.html +++ b/dist/popup.html @@ -3,8 +3,6 @@ SaltBot Controls - - @@ -81,26 +79,10 @@

Chromosomes Management

Reset Pool
-
-
- Export -
-
- Import -
-
-

Records Management

-
- Export -
-
- Import -
-

Options

diff --git a/src/config.ts b/src/config.ts index 7d6494a2..b82932d5 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,17 +1,45 @@ +import { saveAs } from 'file-saver'; +import * as moment from 'moment'; + import type { Settings } from "./settings"; -import type { Bettor, Character } from "./records"; +import { Bettor, Character, displayDialogMessage, MatchRecord, Updater } from "./records"; +import { Chromosome } from "./strategy"; +import { Globals } from './globals'; -function btnClicked(clicktype: string, data: number | boolean | string = null): void { - chrome.tabs.query({ - active: true, - currentWindow: true, - }, function() { - chrome.runtime.sendMessage({ - text: data, - type: clicktype, - }, function(response) { - console.debug(response); - }); +$(function() { + document.querySelector("#bic").onclick = function(): void { + document.querySelector("#upload_c").click(); + }; + document.querySelector("#bir").onclick = function(): void { + document.querySelector("#upload_r").click(); + }; +}); + +function prepareJQueryDialog(): void { + let dialogTimer: NodeJS.Timer = null; + + $("#dialog").dialog({ + autoOpen: false, + title: "Saltbot Notification", + open() { + if (dialogTimer !== null) { + clearTimeout(dialogTimer); + } + + const dia = $(this); + dialogTimer = setTimeout(function() { + dia.dialog("close"); + }, 5000); + }, + }); +} + +function btnClicked(clicktype: string, data: number | boolean | string | ArrayBuffer = null): void { + chrome.runtime.sendMessage({ + text: data, + type: clicktype, + }, function(response) { + console.debug(response); }); } function elementChanged(changetype: string, data: number | boolean | string): void { @@ -76,6 +104,61 @@ function prClick(): void { //btnClicked("pr"); } +function irClick(): void { + console.log("Attempting records import..."); + const files = document.querySelector("#upload_r").files; + if (files.length > 0) { + console.log("Upload successful."); + } + else { + console.log("Upload canceled."); + } + console.log("Attempting to read file..."); + + const file = files[0]; + document.querySelector("#upload_r").value = ""; + const reader = new FileReader(); + reader.onload = onFileReadRecord; + reader.readAsText(file); +} + +function icClick(): void { + console.log("Attempting chromosome import..."); + const files = document.querySelector("#upload_c").files; + if (files.length > 0) { + console.log("Upload successful."); + } + else { + console.log("Upload canceled."); + } + console.log("Attempting to read file..."); + + const file = files[0]; + document.querySelector("#upload_c").value = ""; + const reader = new FileReader(); + reader.onload = onFileReadChromosome; + reader.readAsText(file); +} + +function erClick(): void { + er(); +} + +function ecClick(): void { + ec(); +} + +function onFileReadRecord(e: ProgressEvent): void { + console.log("File read successful."); + const t = e.target.result; + ir(t as string); +} +function onFileReadChromosome(e: ProgressEvent): void { + console.log("File read successful."); + const t = e.target.result; + ic(t as string); +} + function teChange(): void { elementChanged("te", document.querySelector("#te").checked); } @@ -115,6 +198,11 @@ document.addEventListener("DOMContentLoaded", function() { document.querySelector("#limitUpsetBetting").value = String(results.settings_v1.upsetBetting_limit); }); + document.querySelector("#ber").addEventListener("click", erClick); + document.querySelector("#upload_r").addEventListener("change", irClick); + document.querySelector("#bec").addEventListener("click", ecClick); + document.querySelector("#upload_c").addEventListener("change", icClick); + document.querySelector("#bdr").addEventListener("click", drClick); document.querySelector("#bpr").addEventListener("click", prClick); document.querySelector("#te").addEventListener("change", teChange); @@ -131,4 +219,166 @@ document.addEventListener("DOMContentLoaded", function() { document.querySelector("#checkUpsetBetting").addEventListener("change", upsetBettingChange); document.querySelector("#limitUpsetBetting").addEventListener("keyup", upsetBettingChange); document.querySelector("#limitUpsetBetting").addEventListener("input", upsetBettingChange); + + prepareJQueryDialog(); }); + +function er(): void { + const lines: string[] = []; + let matches: MatchRecord[] = []; + chrome.runtime.sendMessage({ query: "getMatchRecords" }, function(data: MatchRecord[]) { + matches = data; + + for (const match of matches) { + let record = `${match.c1},${match.c2},${match.w},${match.sn},${match.pw},`; + record += (match.hasOwnProperty("t")) ? match.t : "U"; + record += ","; + record += (match.hasOwnProperty("m")) ? match.m : "U"; + record += ","; + record += (match.hasOwnProperty("o")) ? match.o : "U"; + record += ","; + record += (match.hasOwnProperty("ts")) ? match.ts : 0; + record += ","; + record += (match.hasOwnProperty("cf")) ? match.cf : 2; + record += ","; + record += (match.hasOwnProperty("if")) ? match.if : 2; + record += ","; + record += (match.hasOwnProperty("dt")) ? match.dt : moment().format("DD-MM-YYYY"); + record += "\n"; + lines.push(record); + } + + const blobM = new Blob(lines, { + type: "text/plain;charset=utf-8", + }); + const timeStr = moment().format("YYYY-MM-DD-HH.mm"); + saveAs(blobM, "saltyRecordsM--" + timeStr + ".txt"); + }); +} + +function ir(f: string): void { + const updater = new Updater(); + const matchRecords = []; + const characterRecords: Character[] = []; + const namesOfCharactersWhoAlreadyHaveRecords: string[] = []; + + //numberOfProperties refers to c1, c2, w, sn, etc. + const numberOfProperties = 12; + let mObj: MatchRecord = null; + const lines = f.split("\n"); + for (const line of lines) { + line.replace("\r", ""); + const match = line.split(","); + + for (let j = 0; j < match.length; j++) { + switch (j % numberOfProperties) { + case 0: + mObj = new MatchRecord(); + mObj.c1 = match[j]; + break; + case 1: + mObj.c2 = match[j]; + break; + case 2: + mObj.w = +match[j]; + break; + case 3: + mObj.sn = match[j]; + break; + case 4: + mObj.pw = match[j]; + break; + case 5: + mObj.t = match[j]; + break; + case 6: + mObj.m = match[j]; + break; + case 7: + mObj.o = match[j]; + break; + case 8: + mObj.ts = +match[j]; + break; + case 9: + mObj.cf = +match[j]; + break; + case 10: + mObj.if = +match[j]; + break; + case 11: { + //trim to get rid of linebreaks at the end + mObj.dt = match[j].trim(); + matchRecords.push(mObj); + const c1Obj = updater.getCharacter(mObj.c1, characterRecords, namesOfCharactersWhoAlreadyHaveRecords); + const c2Obj = updater.getCharacter(mObj.c2, characterRecords, namesOfCharactersWhoAlreadyHaveRecords); + updater.updateCharactersFromMatch(mObj, c1Obj, c2Obj); + break; + } + } + } + } + const nmr = matchRecords.length; + const ncr = characterRecords.length; + //All records have been rebuilt, so update them + + chrome.runtime.sendMessage({ data: matchRecords, query: "setMatchRecords" }); + chrome.storage.local.set({ + characters_v1: characterRecords, + }, function() { + const recordsImportedMsg = `Records imported: \n${nmr} match records\n${ncr} character records`; + console.log("-\n" + recordsImportedMsg); + displayDialogMessage(recordsImportedMsg); + Globals.dirtyRecords = true; + }); +} + +function ec(): void { + chrome.storage.local.get(["chromosomes_v1"], function(results: {chromosomes_v1: Chromosome[]}) { + if (results.chromosomes_v1 && results.chromosomes_v1.length > 0) { + let chromosome = new Chromosome(); + chromosome = chromosome.loadFromObject(results.chromosomes_v1[0]); + const lines = JSON.stringify(chromosome, null, "\t").split("\n"); + for (let i = 0; i < lines.length; ++i) { + lines[i] += "\n"; + } + + const blobM = new Blob(lines, { + type: "text/plain;charset=utf-8", + }); + const timeStr = moment().format("YYYY-MM-DD-HH.mm"); + saveAs(blobM, "chromosome--" + timeStr + ".txt"); + } + else { + console.log("- No chromosomes found."); + } + }); +} + +function ic(jsonString: string): void { + const chromosome = new Chromosome(); + try { + chromosome.loadFromJSON(jsonString); + } + catch (err) { + console.log("- Could not read chromosome file."); + return; + } + + //get the chromosomes currently saved in the list + chrome.storage.local.get(["chromosomes_v1"], function(results: {chromosomes_v1: Chromosome[]}) { + let chromosomes = results.chromosomes_v1; + if (chromosomes) { + chromosomes[0] = chromosome; + } + else { + chromosomes = [chromosome]; + } + chrome.storage.local.set({ + chromosomes_v1: chromosomes, + }, function() { + console.log("- Chromosome imported successfully."); + displayDialogMessage("Chromosome imported successfully."); + }); + }); +} diff --git a/src/popup.ts b/src/popup.ts index 2f57f143..93503280 100644 --- a/src/popup.ts +++ b/src/popup.ts @@ -14,15 +14,6 @@ $(function() { }); }); -$(function() { - document.querySelector("#bic").onclick = function(): void { - document.querySelector("#upload_c").click(); - }; - document.querySelector("#bir").onclick = function(): void { - document.querySelector("#upload_r").click(); - }; -}); - function btnClicked(clicktype: string, data: number | boolean | string | ArrayBuffer = null): void { data = data || null; chrome.tabs.query({ @@ -45,14 +36,6 @@ function elementChanged(changetype: string, data: number | boolean | string): vo } class ViewModel extends Settings { - erClick(): void { - btnClicked("er"); - } - - ecClick(): void { - btnClicked("ec"); - } - tvClick(): void { btnClicked("tv"); } @@ -126,42 +109,6 @@ class ViewModel extends Settings { this.setButtonActive("#cs_ipu"); } - irClick(): void { - console.log("Attempting records import..."); - const files = document.querySelector("#upload_r").files; - if (files.length > 0) { - console.log("Upload successful."); - } - else { - console.log("Upload canceled."); - } - console.log("Attempting to read file..."); - - const file = files[0]; - document.querySelector("#upload_r").value = ""; - const reader = new FileReader(); - reader.onload = onFileReadRecord; - reader.readAsText(file); - } - - icClick(): void { - console.log("Attempting chromosome import..."); - const files = document.querySelector("#upload_c").files; - if (files.length > 0) { - console.log("Upload successful."); - } - else { - console.log("Upload canceled."); - } - console.log("Attempting to read file..."); - - const file = files[0]; - document.querySelector("#upload_c").value = ""; - const reader = new FileReader(); - reader.onload = onFileReadChromosome; - reader.readAsText(file); - } - updateGeneticWeightsClick(): void { simulator.evalMutations(); } @@ -171,19 +118,6 @@ class ViewModel extends Settings { } } - - -function onFileReadRecord(e: ProgressEvent): void { - console.log("File read successful."); - const t = e.target.result; - btnClicked("ir", t); -} -function onFileReadChromosome(e: ProgressEvent): void { - console.log("File read successful."); - const t = e.target.result; - btnClicked("ic", t); -} - //--------------------------------------------------------------------------------------------------------- // SIMULATOR SECTION //--------------------------------------------------------------------------------------------------------- diff --git a/src/records.ts b/src/records.ts index cab26437..6018427f 100644 --- a/src/records.ts +++ b/src/records.ts @@ -1,9 +1,5 @@ -import * as moment from 'moment'; - -import { Chromosome } from './strategy'; import { binarySearchByProperty, binaryInsertByProperty } from './utils'; import { Globals } from './globals'; -import { saveAs } from 'file-saver'; export function displayDialogMessage(message: string): void { const dialog = $("#dialog"); @@ -199,185 +195,11 @@ export class Updater { } } - -function er(): void { - const lines: string[] = []; - let matches: MatchRecord[] = []; - chrome.runtime.sendMessage({ query: "getMatchRecords" }, function(data: MatchRecord[]) { - matches = data; - - for (const match of matches) { - let record = `${match.c1},${match.c2},${match.w},${match.sn},${match.pw},`; - record += (match.hasOwnProperty("t")) ? match.t : "U"; - record += ","; - record += (match.hasOwnProperty("m")) ? match.m : "U"; - record += ","; - record += (match.hasOwnProperty("o")) ? match.o : "U"; - record += ","; - record += (match.hasOwnProperty("ts")) ? match.ts : 0; - record += ","; - record += (match.hasOwnProperty("cf")) ? match.cf : 2; - record += ","; - record += (match.hasOwnProperty("if")) ? match.if : 2; - record += ","; - record += (match.hasOwnProperty("dt")) ? match.dt : moment().format("DD-MM-YYYY"); - record += "\n"; - lines.push(record); - } - - const blobM = new Blob(lines, { - type: "text/plain;charset=utf-8", - }); - const timeStr = moment().format("YYYY-MM-DD-HH.mm"); - saveAs(blobM, "saltyRecordsM--" + timeStr + ".txt"); - }); -} - -function ir(f: string): void { - const updater = new Updater(); - const matchRecords = []; - const characterRecords: Character[] = []; - const namesOfCharactersWhoAlreadyHaveRecords: string[] = []; - - //numberOfProperties refers to c1, c2, w, sn, etc. - const numberOfProperties = 12; - let mObj: MatchRecord = null; - const lines = f.split("\n"); - for (const line of lines) { - line.replace("\r", ""); - const match = line.split(","); - - for (let j = 0; j < match.length; j++) { - switch (j % numberOfProperties) { - case 0: - mObj = new MatchRecord(); - mObj.c1 = match[j]; - break; - case 1: - mObj.c2 = match[j]; - break; - case 2: - mObj.w = +match[j]; - break; - case 3: - mObj.sn = match[j]; - break; - case 4: - mObj.pw = match[j]; - break; - case 5: - mObj.t = match[j]; - break; - case 6: - mObj.m = match[j]; - break; - case 7: - mObj.o = match[j]; - break; - case 8: - mObj.ts = +match[j]; - break; - case 9: - mObj.cf = +match[j]; - break; - case 10: - mObj.if = +match[j]; - break; - case 11: { - //trim to get rid of linebreaks at the end - mObj.dt = match[j].trim(); - matchRecords.push(mObj); - const c1Obj = updater.getCharacter(mObj.c1, characterRecords, namesOfCharactersWhoAlreadyHaveRecords); - const c2Obj = updater.getCharacter(mObj.c2, characterRecords, namesOfCharactersWhoAlreadyHaveRecords); - updater.updateCharactersFromMatch(mObj, c1Obj, c2Obj); - break; - } - } - } - } - const nmr = matchRecords.length; - const ncr = characterRecords.length; - //All records have been rebuilt, so update them - - chrome.runtime.sendMessage({ data: matchRecords, query: "setMatchRecords" }); - chrome.storage.local.set({ - characters_v1: characterRecords, - }, function() { - const recordsImportedMsg = `Records imported: \n${nmr} match records\n${ncr} character records`; - console.log("-\n" + recordsImportedMsg); - displayDialogMessage(recordsImportedMsg); - Globals.dirtyRecords = true; - }); -} - -function ec(): void { - chrome.storage.local.get(["chromosomes_v1"], function(results: {chromosomes_v1: Chromosome[]}) { - if (results.chromosomes_v1 && results.chromosomes_v1.length > 0) { - let chromosome = new Chromosome(); - chromosome = chromosome.loadFromObject(results.chromosomes_v1[0]); - const lines = JSON.stringify(chromosome, null, "\t").split("\n"); - for (let i = 0; i < lines.length; ++i) { - lines[i] += "\n"; - } - - const blobM = new Blob(lines, { - type: "text/plain;charset=utf-8", - }); - const timeStr = moment().format("YYYY-MM-DD-HH.mm"); - saveAs(blobM, "chromosome--" + timeStr + ".txt"); - } - else { - console.log("- No chromosomes found."); - } - }); -} - -function ic(jsonString: string): void { - const chromosome = new Chromosome(); - try { - chromosome.loadFromJSON(jsonString); - } - catch (err) { - console.log("- Could not read chromosome file."); - return; - } - - //get the chromosomes currently saved in the list - chrome.storage.local.get(["chromosomes_v1"], function(results: {chromosomes_v1: Chromosome[]}) { - let chromosomes = results.chromosomes_v1; - if (chromosomes) { - chromosomes[0] = chromosome; - } - else { - chromosomes = [chromosome]; - } - chrome.storage.local.set({ - chromosomes_v1: chromosomes, - }, function() { - console.log("- Chromosome imported successfully."); - displayDialogMessage("Chromosome imported successfully."); - }); - }); - -} - if (window.location.href === "http://www.saltybet.com/" || window.location.href === "http://mugen.saltybet.com/" || window.location.href === "https://www.saltybet.com/" || window.location.href === "https://mugen.saltybet.com/") { - chrome.runtime.onMessage.addListener(function(request: { type: string; text: string }, _sender: chrome.runtime.MessageSender, sendResponse: (response?: unknown) => void): boolean { + chrome.runtime.onMessage.addListener(function(request: { type: string; text: string }, _sender: chrome.runtime.MessageSender) { const ctrl = Globals.ctrl; switch (request.type) { - case "er": - er(); - break; - case "ir": - ir(request.text); - break; - case "ec": - ec(); - break; - case "ic": - ic(request.text); - break; case "tv": ctrl.toggleVideoWindow(); break; @@ -428,10 +250,6 @@ if (window.location.href === "http://www.saltybet.com/" || window.location.href case "maximumBetAmount_disable": ctrl.setMaximumBetAmount(request.type.endsWith("enable"), +request.text); break; - default: - sendResponse({ farewell: ("Request type " + request.type + " cannot be handled.") }); - return true; } - return false; }); } diff --git a/src/salty.ts b/src/salty.ts index ce384c77..1f8a8b07 100644 --- a/src/salty.ts +++ b/src/salty.ts @@ -527,34 +527,6 @@ Length of match in seconds: ${mr.ts}`); } } -function prepareJQueryDialog(): void { - $('link[href="../css/jquery-ui-1.11.min.css"]').prop("disabled", true); - const link = ''; - $("head").append(link); - - const wrapper = document.getElementById("wrapper"); - const messageDialogue = document.createElement("div"); - messageDialogue.setAttribute("id", "dialog"); - wrapper.appendChild(messageDialogue); - - let dialogTimer: NodeJS.Timer = null; - - $("#dialog").dialog({ - autoOpen: false, - title: "Saltbot Notification", - open() { - if (dialogTimer !== null) { - clearTimeout(dialogTimer); - } - - const dia = $(this); - dialogTimer = setTimeout(function() { - dia.dialog("close"); - }, 5000); - }, - }); -} - function correctChatIFrame(): void { const chatFrame = (document.getElementById("chat-frame-stream") as HTMLIFrameElement); if (chatFrame.src === "http://twitch.tv/saltybet/chat") { @@ -734,11 +706,3 @@ if (window.location.href === "http://www.saltybet.com/" || window.location.href window.addEventListener("beforeunload", function() { Globals.ctrl.enableVideoWindow(); }); - -prepareJQueryDialog(); - -export function displayDialogMessage(message: string): void { - const dialog = $("#dialog"); - dialog.html(message.replace(/\n/g, "
")); - dialog.dialog("open"); -} diff --git a/src/twitch_background.ts b/src/twitch_background.ts index 9c572c5d..e477a452 100644 --- a/src/twitch_background.ts +++ b/src/twitch_background.ts @@ -209,9 +209,6 @@ chrome.runtime.onMessage.addListener(function(details: any, sender: chrome.runti } } - if (sendResponse !== undefined) { - sendResponse(null); - } return false; }); function sendUpdatedChromosome(): void { diff --git a/webpack.config.js b/webpack.config.js index d2b91db7..738ee6ac 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -47,6 +47,7 @@ module.exports = { minimize: false }, externals: { - moment: 'moment' + moment: 'moment', + 'file-saver': 'file-saver' }, }; \ No newline at end of file