Add write condition for DAT protocol (#3244)

In order to write to a DAT with Beaker Browser, it needs to have access to the file via `dat:` protocol.
This commit is contained in:
Sebastian Silva
2018-05-02 15:57:47 +01:00
committed by Jeremy Ruston
parent 5626148202
commit 895447c40c
+1 -1
View File
@@ -51,7 +51,7 @@ BeakerSaver.prototype.info = {
Static method that returns true if this saver is capable of working
*/
exports.canSave = function(wiki) {
return !!window.DatArchive;
return !!window.DatArchive && location.protocol==="dat:";
};
/*