mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
included namespace define as well
This commit is contained in:
parent
accb88b78e
commit
20596ddccd
|
@ -10,6 +10,8 @@ const ignoredPages = {
|
|||
|
||||
const appName = "com.chatterino.chatterino";
|
||||
|
||||
let port;
|
||||
|
||||
function matchUrl(url) {
|
||||
if (!url)
|
||||
return;
|
||||
|
@ -25,7 +27,8 @@ function matchUrl(url) {
|
|||
}
|
||||
}
|
||||
|
||||
var port = chrome.runtime.connectNative("com.chatterino.chatterino");
|
||||
function connectPort() {
|
||||
let port = chrome.runtime.connectNative("com.chatterino.chatterino");
|
||||
|
||||
port.onMessage.addListener(function(msg) {
|
||||
console.log(msg);
|
||||
|
@ -33,16 +36,12 @@ port.onMessage.addListener(function(msg) {
|
|||
port.onDisconnect.addListener(function() {
|
||||
console.log("Disconnected");
|
||||
});
|
||||
port.postMessage({ text: "Hello, my_application" });
|
||||
}
|
||||
|
||||
function selectChannel(channelName) {
|
||||
console.log(channelName);
|
||||
|
||||
port.postMessage({channelName: channelName});
|
||||
|
||||
// chrome.runtime.sendNativeMessage(appName, { "xd": true }, (resp) => {
|
||||
// console.log(resp);
|
||||
// })
|
||||
}
|
||||
|
||||
/// add listeners
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
|
||||
#ifdef BOOSTLIBS
|
||||
#include <boost/interprocess/ipc/message_queue.hpp>
|
||||
|
||||
namespace ipc = boost::interprocess;
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
|
@ -21,8 +23,6 @@
|
|||
#define EXTENSION_ID "aeicjepmjkgmbeohnchmpfjbpchogmjn"
|
||||
#define MESSAGE_SIZE 1024
|
||||
|
||||
namespace ipc = boost::interprocess;
|
||||
|
||||
namespace chatterino {
|
||||
namespace singletons {
|
||||
|
||||
|
|
Loading…
Reference in a new issue