//console.log("SearchPreview Embedded WebExtension");

browser.runtime.sendMessage("replyWithPrefs").then(r => {
	if (r) {
		console.log("SearchPreview prefs for embedded webextension:");
		console.log("  insertpreviews : " + r.insertpreviews);
		console.log("  insertrelated : " + r.insertrelated);
		console.log("  insertranks : " + r.insertranks);

		chrome.storage.local.set({
			"insertpreviews" : r.insertpreviews, 
			"insertrelated" : r.insertrelated,
			"insertranks" : r.insertranks
		}, function() {});
	}
});