mirror of
https://github.com/google/blockly.git
synced 2026-01-04 15:40:08 +01:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user