Add {{Optional}} to help URLs. (#1413)

* Add {{Optional}} to help URLs.
Fixes issue #898.

* Leakage from Blockly Games?

* Propagate msg-Blockly -> msg-blockly change back to messages.js
As made by wikitranslate in 69b10dba79
This commit is contained in:
Neil Fraser
2018-01-05 15:20:42 -08:00
committed by GitHub
parent 733a629f06
commit eb61152ac2
4 changed files with 144 additions and 146 deletions

View File

@@ -93,7 +93,7 @@ Code.workspace = null;
* Extracts a parameter from the URL.
* If the parameter is absent default_value is returned.
* @param {string} name The name of the parameter.
* @param {string} defaultValue Value to return if paramater not found.
* @param {string} defaultValue Value to return if parameter not found.
* @return {string} The parameter value or the default value if not found.
*/
Code.getStringParamFromUrl = function(name, defaultValue) {
@@ -158,10 +158,8 @@ Code.loadBlocks = function(defaultXml) {
*/
Code.changeLanguage = function() {
// Store the blocks for the duration of the reload.
// This should be skipped for the index page, which has no blocks and does
// not load Blockly.
// MSIE 11 does not support sessionStorage on file:// URLs.
if (typeof Blockly != 'undefined' && window.sessionStorage) {
if (window.sessionStorage) {
var xml = Blockly.Xml.workspaceToDom(Code.workspace);
var text = Blockly.Xml.domToText(xml);
window.sessionStorage.loadOnceBlocks = text;