Skip to content

Commit

Permalink
keep move state in session
Browse files Browse the repository at this point in the history
fixed build .0 version updates
updated app.js
  • Loading branch information
alex-Symbroson committed Nov 12, 2023
1 parent a0ff97c commit 79f553e
Show file tree
Hide file tree
Showing 11 changed files with 456 additions and 227 deletions.
216 changes: 143 additions & 73 deletions docs/docs/app.js

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion docs/docs/js/forward.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
const versions = {"en":"v265"};
(function Forward(move = true) {
const oldHost = 'symdstools.github.io', newHost = 'droidscript.github.io';
if (location.host === oldHost && move) return moveSite();
move &&= sessionStorage.getItem("moveDocs") !== "false";
move &&= !location.search.includes('move=false');
if (!move) sessionStorage.setItem("moveDocs", "false");
if (move && location.host === oldHost) return moveSite();

const pathname = location.pathname;
const getLink = (m, add, lang = 'en') => `/Docs/docs${add || ''}/${versions[lang] || versions.en}/`;
Expand Down
5 changes: 4 additions & 1 deletion docs/docs/js/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ $(window).load(function () {
repo + "/Docs/master/docs/version.txt",
null, OnRemoteVersion);

localVer = (app.GetDSVersion() + "000").replace(/\D/g, '').slice(0, 3) + '.' + app.GetDSBuild();
const localBuild = app.GetDSBuild();
localVer = (app.GetDSVersion() + "000").replace(/\D/g, '').slice(0, 3);
if (localBuild) localVer += '.' + localBuild;

const docsHtm = app.ReadFile(docsPath + "docs/Docs.htm") + "";
const docsVer = docsHtm.slice(docsHtm.indexOf("Docs version: ") + 14);
installedVer = docsVer.slice(0, docsVer.indexOf("<"));
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/v265/Docs.htm
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ <h1>Documentation</h1>

<p style="width:100%;text-align:right">
<small>
<!-- version.txt: 19672265 -->
<!-- version.txt: 19673265 -->
<i class="fa fa-warning"></i>
<a class="ui-link normal-link" target="_blank" onclick="return OpenUrl(this.href)"
href="https://github.com/DroidScript/Docs/issues">Report Issue</a><br>
<span onclick="location.reload()">Docs version: 265</span>&ensp;<i>(11/11/2023)</i><br>
<span onclick="location.reload()">Docs version: 265</span>&ensp;<i>(12/11/2023)</i><br>
by <a class="no-ui-link normal-link" target="_blank" onclick="return OpenUrl(this.href)"
href="https://github.com/alex-Symbroson">Symbroson</a>, <a class="no-ui-link normal-link"
target="_blank" onclick="return OpenUrl(this.href)"
Expand Down
5 changes: 4 additions & 1 deletion docs/docs/v265/js/forward.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
const versions = {"en":"v265"};
(function Forward(move = true) {
const oldHost = 'symdstools.github.io', newHost = 'droidscript.github.io';
if (location.host === oldHost && move) return moveSite();
move &&= sessionStorage.getItem("moveDocs") !== "false";
move &&= !location.search.includes('move=false');
if (!move) sessionStorage.setItem("moveDocs", "false");
if (move && location.host === oldHost) return moveSite();

const pathname = location.pathname;
const getLink = (m, add, lang = 'en') => `/Docs/docs${add || ''}/${versions[lang] || versions.en}/`;
Expand Down
5 changes: 4 additions & 1 deletion docs/docs/v265/js/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ $(window).load(function () {
repo + "/Docs/master/docs/version.txt",
null, OnRemoteVersion);

localVer = (app.GetDSVersion() + "000").replace(/\D/g, '').slice(0, 3) + '.' + app.GetDSBuild();
const localBuild = app.GetDSBuild();
localVer = (app.GetDSVersion() + "000").replace(/\D/g, '').slice(0, 3);
if (localBuild) localVer += '.' + localBuild;

const docsHtm = app.ReadFile(docsPath + "docs/Docs.htm") + "";
const docsVer = docsHtm.slice(docsHtm.indexOf("Docs version: ") + 14);
installedVer = docsVer.slice(0, docsVer.indexOf("<"));
Expand Down
2 changes: 1 addition & 1 deletion docs/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
19672265
19673265
216 changes: 143 additions & 73 deletions files/app.js

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion files/docs-base/js/forward.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
const versions = {"en":"v265"};
(function Forward(move = true) {
const oldHost = 'symdstools.github.io', newHost = 'droidscript.github.io';
if (location.host === oldHost && move) return moveSite();
move &&= sessionStorage.getItem("moveDocs") !== "false";
move &&= !location.search.includes('move=false');
if (!move) sessionStorage.setItem("moveDocs", "false");
if (move && location.host === oldHost) return moveSite();

const pathname = location.pathname;
const getLink = (m, add, lang = 'en') => `/Docs/docs${add || ''}/${versions[lang] || versions.en}/`;
Expand Down
5 changes: 4 additions & 1 deletion files/docs-base/js/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ $(window).load(function () {
repo + "/Docs/master/docs/version.txt",
null, OnRemoteVersion);

localVer = (app.GetDSVersion() + "000").replace(/\D/g, '').slice(0, 3) + '.' + app.GetDSBuild();
const localBuild = app.GetDSBuild();
localVer = (app.GetDSVersion() + "000").replace(/\D/g, '').slice(0, 3);
if (localBuild) localVer += '.' + localBuild;

const docsHtm = app.ReadFile(docsPath + "docs/Docs.htm") + "";
const docsVer = docsHtm.slice(docsHtm.indexOf("Docs version: ") + 14);
installedVer = docsVer.slice(0, docsVer.indexOf("<"));
Expand Down
Loading

0 comments on commit 79f553e

Please sign in to comment.