etcet / HNES

Hacker News Extension Suite
Other
248 stars 71 forks source link

Upgrade deprecated function calls to their replacements #111

Closed jonafato closed 8 years ago

jonafato commented 8 years ago

chrome.extension.sendRequest [1] and chrome.extension.onRequest [2] have been deprecated and replaced by chrome.runtime.sendMessage and chrome.runtime.onMessage respectively. This change updates the use of these functions.

A side effect of this change is partial Firefox compatibility. With these changes and an applications [3] object added to manifest.json, the extension appears functional in Firefox. There are visual issues when running in Firefox that should be addressed with CSS before packaging and releasing as a Firefox addon.

References #54.

[1] https://developer.chrome.com/extensions/extension#method-sendRequest [2] https://developer.chrome.com/extensions/extension#event-onRequest [3] https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json/applications