diff options
Diffstat (limited to 'recipes/tweetdeck')
-rw-r--r-- | recipes/tweetdeck/index.js | 30 | ||||
-rw-r--r-- | recipes/tweetdeck/webview.js | 4 |
2 files changed, 14 insertions, 20 deletions
diff --git a/recipes/tweetdeck/index.js b/recipes/tweetdeck/index.js index c76dc18..1326a29 100644 --- a/recipes/tweetdeck/index.js +++ b/recipes/tweetdeck/index.js | |||
@@ -1,21 +1,17 @@ | |||
1 | 'use strict'; | 1 | module.exports = Franz => class Tweetdeck extends Franz { |
2 | constructor(...args) { | ||
3 | let _temp; | ||
2 | 4 | ||
3 | module.exports = Franz => { | 5 | return _temp = super(...args), this.events = { |
4 | return class Tweetdeck extends Franz { | 6 | 'did-get-redirect-request': '_redirectFix', |
5 | constructor(...args) { | 7 | }, _temp; |
6 | var _temp; | 8 | } |
7 | 9 | ||
8 | return _temp = super(...args), this.events = { | 10 | _redirectFix(event) { |
9 | 'did-get-redirect-request': '_redirectFix' | 11 | if (event.newURL !== undefined && event.oldURL !== undefined && event.isMainFrame) { |
10 | }, _temp; | 12 | setTimeout(() => this.send('redirect-url', event.newURL), 100); |
13 | event.preventDefault(); | ||
11 | } | 14 | } |
12 | 15 | } | |
13 | _redirectFix(event) { | ||
14 | if (event.newURL !== undefined && event.oldURL !== undefined && event.isMainFrame) { | ||
15 | setTimeout(() => this.send('redirect-url', event.newURL), 100); | ||
16 | event.preventDefault(); | ||
17 | } | ||
18 | } | ||
19 | }; | ||
20 | }; | 16 | }; |
21 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInR3ZWV0ZGVjay9pbmRleC5qcyJdLCJuYW1lcyI6WyJtb2R1bGUiLCJleHBvcnRzIiwiRnJhbnoiLCJUd2VldGRlY2siLCJldmVudHMiLCJfcmVkaXJlY3RGaXgiLCJldmVudCIsIm5ld1VSTCIsInVuZGVmaW5lZCIsIm9sZFVSTCIsImlzTWFpbkZyYW1lIiwic2V0VGltZW91dCIsIn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c0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSBGcmFueiA9PiBjbGFzcyBUd2VldGRlY2sgZXh0ZW5kcyBGcmFueiB7XG4gIGV2ZW50cyA9IHtcbiAgICAnZGlkLWdldC1yZWRpcmVjdC1yZXF1ZXN0JzogJ19yZWRpcmVjdEZpeCcsXG4gIH1cblxuICBfcmVkaXJlY3RGaXgoZXZlbnQpIHtcbiAgICBpZiAoZXZlbnQubmV3VVJMICE9PSB1bmRlZmluZWQgJiYgZXZlbnQub2xkVVJMICE9PSB1bmRlZmluZWQgJiYgZXZlbnQuaXNNYWluRnJhbWUpIHtcbiAgICAgIGlmIChldmVudC5pc01haW5GcmFtZSkge1xuICAgICAgICBzZXRUaW1lb3V0KCgpID0+IHRoaXMuc2VuZCgncmVkaXJlY3QtdXJsJywgZXZlbnQubmV3VVJMKSwgMTAwKTtcbiAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgIH1cbiAgICB9XG4gIH1cbn07XG4iXX0= |
diff --git a/recipes/tweetdeck/webview.js b/recipes/tweetdeck/webview.js index dbf004c..75c7948 100644 --- a/recipes/tweetdeck/webview.js +++ b/recipes/tweetdeck/webview.js | |||
@@ -1,5 +1,3 @@ | |||
1 | 'use strict'; | ||
2 | |||
3 | const { ipcRenderer } = require('electron'); | 1 | const { ipcRenderer } = require('electron'); |
4 | 2 | ||
5 | // Tweetdeck redirect fix | 3 | // Tweetdeck redirect fix |
@@ -19,4 +17,4 @@ module.exports = Franz => { | |||
19 | }; | 17 | }; |
20 | Franz.loop(getMessages); | 18 | Franz.loop(getMessages); |
21 | }; | 19 | }; |
22 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInR3ZWV0ZGVjay93ZWJ2aWV3LmpzIl0sIm5hbWVzIjpbImlwY1JlbmRlcmVyIiwicmVxdWlyZSIsIm9uIiwiZXZlbnQiLCJ1cmwiLCJ3aW5kb3ciL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ywgKGV2ZW50LCB1cmwpID0+IHtcbiAgd2luZG93LmxvY2F0aW9uLmFzc2lnbih1cmwpO1xufSk7XG5cbm1vZHVsZS5leHBvcnRzID0gKEZyYW56KSA9PiB7XG4gIGNvbnN0IGdldE1lc3NhZ2VzID0gZnVuY3Rpb24gZ2V0TWVzc2FnZXMoKSB7XG4gICAgY29uc3QgZWxlbWVudHMgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcubXNnLXVucmVhZC1jb3VudCcpO1xuICAgIGxldCBjb3VudCA9IDA7XG4gICAgaWYgKGVsZW1lbnRzWzBdKSB7XG4gICAgICBjb3VudCA9IHBhcnNlSW50KGVsZW1lbnRzWzBdLmlubmVySFRNTCwgMTApO1xuICAgIH1cblxuICAgIEZyYW56LnNldEJhZGdlKGNvdW50KTtcbiAgfTtcbiAgRnJhbnoubG9vcChnZXRNZXNzYWdlcyk7XG59O1xuIl19 \ No newline at end of file | 20 | // # sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInR3ZWV0ZGVjay93ZWJ2aWV3LmpzIl0sIm5hbWVzIjpbImlwY1JlbmRlcmVyIiwicmVxdWlyZSIsIm9uIiwiZXZlbnQiLCJ1cmwiLCJ3aW5kb3ciLCJsb2NhdGlvbiIsImFzc2lnbiIsIm1vZHVsZSIsImV4cG9ydHMiLCJGcmFueiIsImdldE1lc3NhZ2VzIiwiZWxlbWVudHMiLCJkb2N1bWVudCIsInF1ZXJ5U2VsZWN0b3JBbGwiLCJjb3VudCIsInBhcnNlSW50IiwiaW5uZXJIVE1MIiwic2V0QmFkZ2UiLCJsb29wIl0sIm1hcHBpbmdzIjoiOztBQUFBLE1BQU0sRUFBRUEsV0FBRixLQUFrQkMsUUFBUSxVQUFSLENBQXhCOztBQUVBO0FBQ0FELFlBQVlFLEVBQVosQ0FBZSxjQUFmLEVBQStCLENBQUNDLEtBQUQsRUFBUUMsR0FBUixLQUFnQjtBQUM3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