function toggleAllowFtp() {
function toggle(current) {
console.log(`Current value: ${current.value}`);
browser.browserSettings.ftpProtocolEnabled.set({ value: !current.value });
}
browser.browserSettings.ftpProtocolEnabled.get({}).then(toggle);
}
browser.browserAction.onClicked.addListener(() => {
toggleAllowFtp();
});browserSettings.ftpProtocolEnabled / notebook
browserSettings.ftpProtocolEnabled
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.