Bladeren bron

GUI: Avoid history.pushState on Chrome with file:/ access

dds
PaulStoffregen 9 jaren geleden
bovenliggende
commit
b3e5b475bc
1 gewijzigde bestanden met toevoegingen van 4 en 4 verwijderingen
  1. +4
    -4
      gui/red/nodes.js

+ 4
- 4
gui/red/nodes.js Bestand weergeven

return node_defs[type]; return node_defs[type];
} }
function selectNode(name) { function selectNode(name) {
// on Chrome this causes "Uncaught SecurityError" when used from file:
// but other than errors in the console, doesn't seem to harm anything
window.history.pushState(null, null, window.location.protocol + "//"
+ window.location.host + window.location.pathname + '?info=' + name);
if (!((document.origin == 'null') && (window.chrome))) {
window.history.pushState(null, null, window.location.protocol + "//"
+ window.location.host + window.location.pathname + '?info=' + name);
}
} }
function addNode(n) { function addNode(n) {
if (n._def.category == "config") { if (n._def.category == "config") {

Laden…
Annuleren
Opslaan