Skip to content

Commit 6a14a1b

Browse files
committed
On the share/export page, document additional export options
1 parent b93a422 commit 6a14a1b

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

css/ide.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ a.button
266266
.embedSource, .frameSource
267267
{
268268
width: 80%;
269-
height: 15em;
269+
height: 30em;
270270
overflow: scroll;
271271
}
272272

ide/ide.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,8 +1108,8 @@ $(function () {
11081108
'<script type="text/javascript" src="'+exporturl+'lib/jquery/' + verdir + '/jquery-ui.custom.min.js"></script>\n' +
11091109
'<script type="text/javascript" src="'+exporturl+'package/glow.' + header.version + '.min.js"></script>\n' +
11101110
runner +
1111-
'<script type="text/javascript"><!--//--><![CDATA[//><!--\n' +
1112-
embedScript +
1111+
'<script type="text/javascript"><!--//--><![CDATA[//><!--\n\n// START JAVASCRIPT\n' +
1112+
embedScript + '\n// END JAVASCRIPT\n' +
11131113
'\n//--><!]]></script>' +
11141114
'\n</div>');
11151115
page.find(".embedSource").text( embedHTML )

ide/index.html

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,17 +247,29 @@ <h2>G l o w S c r i p t&nbsp;&nbsp; 2.7</h2>
247247
<b>The program must be in a public folder, not a private folder.</b></li>
248248
<li>You can publish a link to an entire <b>public</b> folder: <a class="folder-link"></a>.</li>
249249
<li>Export: you can <em>embed</em> the program, including from a private folder,
250-
directly in your own web page, using the following HTML.
250+
directly in your own web page, using the HTML provided below.
251251
If your page already uses jquery, you should delete that &lt;script&gt; tag.
252-
<span class="embedWarning errorText"></span>
253-
<p><textarea class="embedSource"></textarea></p>
254252
</li>
253+
<li>Another option is to save the HTML in a file ending in ".html". Doubleclick this file and it
254+
will run in your browser.
255+
You can place this file on a web site and run the program in a browser by giving the URL.</li>
256+
<li>You may have a need to allow anyone to run the program but to keep the program's original source code private.
257+
It is not possible to hide JavaScript code from a user of the program (rightclick the web page and
258+
choose "View page source" or use the browser debugger), but you can "minify" the program to make
259+
it so difficult to read as to make it effectively private. To do this, in the HTML code above, copy the code from "// START JAVASCRIPT"
260+
through "// END JAVASCRIPT" and paste it into a "minifier" such as the one at
261+
<a href="https://javascript-minifier.com" target="_blank">javascript-minifier.com</a>, and then replace the START-END code with
262+
the output of the minifier. You will see that it is very difficult to understand the minified program, even if
263+
you pass it through a "beautifier" program, because many of the variable names have been replaced by single letters.
264+
</ul>
255265
<!--
256266
<li>You can <em>frame</em> the program, using the following HTML
257267
(<b>Warning:</b> this doesn't actually work yet!):
258268
<p><textarea class="frameSource"></pre></textarea></p>
259269
</ul>
260270
-->
271+
<span class="embedWarning errorText"></span>
272+
<p><textarea class="embedSource"></textarea></p>
261273
</div>
262274

263275
<!-- <script type="text/javascript" language="javascript" src="lib/require.min.js"></script> -->

0 commit comments

Comments
 (0)