Skip to content

Commit

Permalink
Merge branch 'master' into gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
eepsmedia committed Feb 9, 2024
2 parents ae0de40 + 0e0bba8 commit f733b8e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
15 changes: 11 additions & 4 deletions eepsmedia/plugins/scrambler/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!--
local just this: http://localhost/plugins/scrambler/
local just this: http://localhost/~tim/plugins/scrambler/
local in local codap :
http://localhost/codap/static/dg/en/cert/index.html?di=https://localhost/plugins/scrambler
http://localhost/~tim/codap/static/dg/en/cert/index.html?di=https://localhost/~tim/codap-data-interactives/eepsmedia/plugins/scrambler
-->

Expand All @@ -10,7 +10,7 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Scrambler 2021</title>
<title>Scrambler 2024</title>

<link href='https://fonts.googleapis.com/css?family=Sirin+Stencil:400' rel='stylesheet'>

Expand All @@ -34,10 +34,17 @@
<div class="scrambler-stripe">
<div class="stripe-element" ><h1 id="scramblerTitle">scrambler</h1></div>

<div class="stripe-element" >
<div class="stripe-element" ><!--
<img src="../../common/art/info.png"
alt="help button" title="Click for detailed help"
class="roundButton" onclick="scrambler.openHelp()">
-->

<a href="https://codap.xyz/guides/scrambler/"
alt="help button" title="Click for detailed help"
class="roundButton" target="_blank">
<img src="../../common/art/info.png" width="24">
</a>
</div>

<div class="stripe-element" id="attributeReport"></div>
Expand Down
8 changes: 5 additions & 3 deletions eepsmedia/plugins/scrambler/src/scrambler.js
Original file line number Diff line number Diff line change
Expand Up @@ -425,10 +425,11 @@ const scrambler = {
* @returns {Promise<void>}
*/
openHelp: async function () {
const theURL = `help/help.${scrambler.state.lang}.html`;
// const theURL = `help/help.${scrambler.state.lang}.html`;
const theURL = `https://codap.xyz/guides/scrambler/`;
const response = await fetch(theURL);

if (response.status == 200) {
if (response.status === 200) {
window.open(theURL, `_blank`);
} else if (response.status === 404) {
window.open(`help/help.en.html`, `_blank`); // default to English
Expand All @@ -449,7 +450,7 @@ const scrambler = {

constants: {
pluginName: "scrambler",
version: "1.6",
version: "1.7",
dimensions: {height: 200, width: 366}, // dimensions,
defaultState: {
lastDatasetName: null,
Expand All @@ -462,6 +463,7 @@ const scrambler = {
measuresPrefixStringID: "sMeasureDatasetPrefix",
scrambledPrefixStringID: "sScrambledDatasetPrefix",
scrambleSetName: "scrset",

},
}

Expand Down
2 changes: 1 addition & 1 deletion eepsmedia/plugins/simmer/strings/localizePlugin.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const localizePlugin = {

languages : ['en', 'es'],
languages : ['en', 'es', 'de'], // todo: eliminate this in favor of the dictionary

/**
* Get a two-letter language code from a variety of sources.
Expand Down

0 comments on commit f733b8e

Please sign in to comment.