diff --git a/mightytext/css/franz.css b/mightytext/css/franz.css new file mode 100644 index 0000000..0886ed7 --- /dev/null +++ b/mightytext/css/franz.css @@ -0,0 +1,36 @@ +#goProWrapper { + display: none !important; +} + +div.sentText, +div.receivedText { + border-radius: 10px; + box-shadow: #b0b0b0 5px 5px 10px; +} + +div.sentText { + background-color: #A0E0A0; + border: 1px #008000 solid; +} + +div.sentText:after { + border-left-color: #008000 !important; +} + +div.receivedText { + background-color: #A0E0F0; + border: 1px #60A0B0 solid; +} + +div.receivedText:after { + border-right-color: #60A0B0 !important; +} + +span.timestamp-msg, +.sentFromIcon { + color: black !important; +} + +svg.messageAction.material-svg { + fill: black !important; +} diff --git a/mightytext/icon.svg b/mightytext/icon.svg new file mode 100644 index 0000000..c639a21 --- /dev/null +++ b/mightytext/icon.svg @@ -0,0 +1,445 @@ + + + + diff --git a/mightytext/index.js b/mightytext/index.js new file mode 100644 index 0000000..258da41 --- /dev/null +++ b/mightytext/index.js @@ -0,0 +1 @@ +module.exports = Franz => Franz; diff --git a/mightytext/logo.png b/mightytext/logo.png new file mode 100644 index 0000000..f65482e Binary files /dev/null and b/mightytext/logo.png differ diff --git a/mightytext/package.json b/mightytext/package.json new file mode 100644 index 0000000..2845cbe --- /dev/null +++ b/mightytext/package.json @@ -0,0 +1,23 @@ +{ + "name": "mightytext", + "version": "1.0.0", + "description": "Support for mightytext SMS service -- Attention, your mobile provider will charge you for SMS messages as you would have sent them from your phone!", + "main": "index.js", + "author": "Jan Kischel ", + "license": "MIT", + "config": { + "serviceURL": "https://mightytext.net/web", + "serviceName": "mightytext", + "message": "", + "popup": [], + "hasNotificationSound": false, + "hasIndirectMessages": false, + "hasTeamID": false, + "customURL": false, + "hostedOnly": false, + "webviewOptions": { + "disablewebsecurity": "" + }, + "openDevTools": false + } +} diff --git a/mightytext/webview.js b/mightytext/webview.js new file mode 100644 index 0000000..4e3a84f --- /dev/null +++ b/mightytext/webview.js @@ -0,0 +1,18 @@ +const path = require('path'); + +module.exports = (Franz, options) => { + const getMessages = () => { + // get unread messages + const updates = document.getElementsByClassName('unread-thread-counter')[0].innerHTML; + + // set Franz badge + Franz.setBadge(updates, 0); + }; + + // inject franz.css stylesheet + Franz.injectCSS(path.join(__dirname, 'css', 'franz.css')); + + // check for new messages every second and update Franz badge + Franz.loop(getMessages); + +}