diff --git a/pywb/static/wombat.js b/pywb/static/wombat.js index e97ffeaf..03ea9732 100644 --- a/pywb/static/wombat.js +++ b/pywb/static/wombat.js @@ -2264,6 +2264,30 @@ var wombat_internal = function($wbwindow) { } } + //============================================ + function init_disable_notifications() { + if (window.Notification) { + window.Notification.requestPermission = function(callback) { + if (callback) { + callback("denied"); + } + + return Promise.resolve("denied"); + } + } + + if (window.geolocation) { + var disabled = function(success, error, options) { + if (error) { + error({"code": 2, "message": "not available"}); + } + } + + window.geolocation.getCurrentPosition = disabled; + window.geolocation.watchPosition = disabled; + } + } + //============================================ function get_final_url(prefix, mod, url) { if (mod == undefined) { @@ -2426,6 +2450,9 @@ var wombat_internal = function($wbwindow) { // open init_open_override(); + // disable notifications + init_disable_notifications(); + // expose functions this.extract_orig = extract_orig; this.rewrite_url = rewrite_url;