Skip to content

Commit

Permalink
Fix import/export for Firefox
Browse files Browse the repository at this point in the history
The popup disappears when you import or export data, so it had to be moved to config.html.
  • Loading branch information
reconman committed Jun 6, 2022
1 parent 1d5fe60 commit edc761a
Show file tree
Hide file tree
Showing 12 changed files with 1,310 additions and 663 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
17 changes: 5 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:**
Expand All @@ -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:
Expand All @@ -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

Expand Down
22 changes: 22 additions & 0 deletions dist/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@
<link rel="stylesheet" href="css/structure.css" type="text/css"/>
<link rel="stylesheet" href="css/form.css" type="text/css"/>
<link rel="stylesheet" href="css/theme.css" type="text/css"/>
<link rel="stylesheet" href="css/obvious-buttons.css" />
<link rel="stylesheet" href="css/jquery-ui.css" />
<script src="js/lib/jquery.min.js"></script>
<script src="js/lib/jquery-ui.min.js"></script>
<script type="text/javascript" src="js/lib/moment.min.js"></script>
<script type="text/javascript" src="js/lib/FileSaver.min.js"></script>
<script src="js/config.js"></script>
</head>
<body id="public">
Expand Down Expand Up @@ -37,6 +42,22 @@ <h2 title="Prevent betting failure due to crashed tabs">Keep alive</h2>
<p>
<input type="checkbox" id="toggleKeepAlive"/>Restore crashed or closed saltybet tabs
</p>
<h2>Chromosome Management</h2>
<div id="bec" class="btn btn-inline btn-success" title="Export your current chromosome weights.">
Export
</div>
<div id="bic" class="btn btn-inline btn-success" title="Import new chromosome weight data.">
<span style="top: 5px; left:3px ;">Import</span>
</div>
<h2 class="subheading">Records Management</h2>
<div id="ber" class="btn btn-inline btn-success" title="Export current recorded match data.">
Export
</div>
<div id="bir" class="btn btn-inline btn-success" title="Import match data.">
<span id="text_upload_r" style="top: 5px; left:3px ;">Import</span>
</div>
<input type="file" id="upload_r" style="display: none">
<input type="file" id="upload_c" style="display: none">
<h2 title="Show a table of player rankings">Display Player Rankings</h2>
<p>
<input type="radio" name="rankings" id="bdr"/>Players by %
Expand All @@ -48,6 +69,7 @@ <h2 title="Show a table of player rankings">Display Player Rankings</h2>
</details>

</form>
<div id="dialog"></div>
</div>
</body>
</html>
Loading

0 comments on commit edc761a

Please sign in to comment.