Skip to content

Commit

Permalink
Fix readme script version change CI PR creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Lammer authored Oct 21, 2022
2 parents 02117a9 + 51e1120 commit 584396f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:

- name: Minify ${{ env.SCRIPT }}
run: |
printf "// ${{ env.VERSION_CURRENT }} - ${{ env.BLOB_URL_PREFIX }}/$GITHUB_SHA/${{ env.SCRIPT }}\n" >${{ env.SCRIPT_MINIFIED }}
printf "// v${{ env.VERSION_CURRENT }} - ${{ env.BLOB_URL_PREFIX }}/$GITHUB_SHA/${{ env.SCRIPT }}\n" >${{ env.SCRIPT_MINIFIED }}
npm run minify | tail -n 1 >>${{ env.SCRIPT_MINIFIED }}
- name: Create version files
Expand Down Expand Up @@ -74,6 +74,7 @@ jobs:
token: ${{ secrets.GH_TOKEN }}
tag_name: ${{ env.RELEASE_NAME }}
generate_release_notes: true
draft: false
files: |
${{ env.SCRIPT_MINIFIED }}
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The shown example chooses 0.4 as default value - to be overwritten if ```Persist
#### Front side
~~~html
<script>
// 1.1.1 - https://github.com/SimonLammer/anki-persistence/blob/149b2c38954d783b02353f178173c094698a36a2/script.js
// v1.1.1 - https://github.com/SimonLammer/anki-persistence/blob/149b2c38954d783b02353f178173c094698a36a2/script.js
if(void 0===window.Persistence){var e="github.com/SimonLammer/anki-persistence/",t="_default";if(window.Persistence_sessionStorage=function(){var i=!1;try{"object"==typeof window.sessionStorage&&(i=!0,this.clear=function(){for(var t=0;t<sessionStorage.length;t++){var i=sessionStorage.key(t);0==i.indexOf(e)&&(sessionStorage.removeItem(i),t--)}},this.setItem=function(i,n){void 0==n&&(n=i,i=t),sessionStorage.setItem(e+i,JSON.stringify(n))},this.getItem=function(i){return void 0==i&&(i=t),JSON.parse(sessionStorage.getItem(e+i))},this.removeItem=function(i){void 0==i&&(i=t),sessionStorage.removeItem(e+i)},this.getAllKeys=function(){for(var t=[],i=Object.keys(sessionStorage),n=0;n<i.length;n++){var s=i[n];0==s.indexOf(e)&&t.push(s.substring(e.length,s.length))}return t.sort()})}catch(n){}this.isAvailable=function(){return i}},window.Persistence_windowKey=function(i){var n=window[i],s=!1;"object"==typeof n&&(s=!0,this.clear=function(){n[e]={}},this.setItem=function(i,s){void 0==s&&(s=i,i=t),n[e][i]=s},this.getItem=function(i){return void 0==i&&(i=t),void 0==n[e][i]?null:n[e][i]},this.removeItem=function(i){void 0==i&&(i=t),delete n[e][i]},this.getAllKeys=function(){return Object.keys(n[e])},void 0==n[e]&&this.clear()),this.isAvailable=function(){return s}},window.Persistence=new Persistence_sessionStorage,Persistence.isAvailable()||(window.Persistence=new Persistence_windowKey("py")),!Persistence.isAvailable()){var i=window.location.toString().indexOf("title"),n=window.location.toString().indexOf("main",i);i>0&&n>0&&n-i<10&&(window.Persistence=new Persistence_windowKey("qt"))}}
</script>

Expand All @@ -66,7 +66,7 @@ window.front.appendChild(document.createTextNode(number)); // Print the number.

~~~html
<script>
// 1.1.1 - https://github.com/SimonLammer/anki-persistence/blob/149b2c38954d783b02353f178173c094698a36a2/script.js
// v1.1.1 - https://github.com/SimonLammer/anki-persistence/blob/149b2c38954d783b02353f178173c094698a36a2/script.js
if(void 0===window.Persistence){var e="github.com/SimonLammer/anki-persistence/",t="_default";if(window.Persistence_sessionStorage=function(){var i=!1;try{"object"==typeof window.sessionStorage&&(i=!0,this.clear=function(){for(var t=0;t<sessionStorage.length;t++){var i=sessionStorage.key(t);0==i.indexOf(e)&&(sessionStorage.removeItem(i),t--)}},this.setItem=function(i,n){void 0==n&&(n=i,i=t),sessionStorage.setItem(e+i,JSON.stringify(n))},this.getItem=function(i){return void 0==i&&(i=t),JSON.parse(sessionStorage.getItem(e+i))},this.removeItem=function(i){void 0==i&&(i=t),sessionStorage.removeItem(e+i)},this.getAllKeys=function(){for(var t=[],i=Object.keys(sessionStorage),n=0;n<i.length;n++){var s=i[n];0==s.indexOf(e)&&t.push(s.substring(e.length,s.length))}return t.sort()})}catch(n){}this.isAvailable=function(){return i}},window.Persistence_windowKey=function(i){var n=window[i],s=!1;"object"==typeof n&&(s=!0,this.clear=function(){n[e]={}},this.setItem=function(i,s){void 0==s&&(s=i,i=t),n[e][i]=s},this.getItem=function(i){return void 0==i&&(i=t),void 0==n[e][i]?null:n[e][i]},this.removeItem=function(i){void 0==i&&(i=t),delete n[e][i]},this.getAllKeys=function(){return Object.keys(n[e])},void 0==n[e]&&this.clear()),this.isAvailable=function(){return s}},window.Persistence=new Persistence_sessionStorage,Persistence.isAvailable()||(window.Persistence=new Persistence_windowKey("py")),!Persistence.isAvailable()){var i=window.location.toString().indexOf("title"),n=window.location.toString().indexOf("main",i);i>0&&n>0&&n-i<10&&(window.Persistence=new Persistence_windowKey("qt"))}}
</script>

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "anki-persistence",
"version": "1.1.9",
"version": "1.1.8",
"description": "Persist data between both sides of an anki flashcard.",
"main": "script.js",
"directories": {
Expand Down

0 comments on commit 584396f

Please sign in to comment.