id stringlengths 34 124 | type stringclasses 4
values | prompt stringlengths 0 4.95k | response stringlengths 21 4.89k | source_lang stringclasses 3
values | target_lang stringclasses 2
values | repo stringclasses 75
values | path stringlengths 10 88 | license stringclasses 1
value | commit stringlengths 40 40 | stars int64 431 18.7k | source_url stringlengths 86 176 | line_start int64 1 214 | line_end int64 3 253 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
dropbox/zxcvbn:test/test-matching.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
check_matches = (t, matches, pattern_names, patterns, ijs, props) ->
if typeof pattern_names is "string"
# shortcut: if checking for a list of the same type of patterns,
# allow passing a string 'pat' instead of array ['pat', 'pat', ...]
pattern_nam... | var check_matches;
check_matches = function(t, matches, pattern_names, patterns, ijs, props) {
var i, is_equal_len_args, j, k, l, lst, match, pattern, pattern_name, prop, prop_list, prop_name, ref, ref1, results;
if (typeof pattern_names === "string") {
// shortcut: if checking for a list of the same type of p... | CoffeeScript | JavaScript | dropbox/zxcvbn | test/test-matching.coffee | MIT | f07ee0f098dcc50c86fa24def70aa5fc4c19f1e6 | 15,961 | https://github.com/dropbox/zxcvbn/blob/f07ee0f098dcc50c86fa24def70aa5fc4c19f1e6/test/test-matching.coffee | 20 | 69 |
dropbox/zxcvbn:test/test-matching.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var check_matches;
check_matches = function(t, matches, pattern_names, patterns, ijs, props) {
var i, is_equal_len_args, j, k, l, lst, match, pattern, pattern_name, prop, prop_list, prop_name, ref, ref1, results;
if (typeof pattern_names === "string") {
//... | check_matches = (t, matches, pattern_names, patterns, ijs, props) ->
if typeof pattern_names is "string"
# shortcut: if checking for a list of the same type of patterns,
# allow passing a string 'pat' instead of array ['pat', 'pat', ...]
pattern_names = (pattern_names for i in [0...patterns.length])
is... | JavaScript | CoffeeScript | dropbox/zxcvbn | test/test-matching.coffee | MIT | f07ee0f098dcc50c86fa24def70aa5fc4c19f1e6 | 15,961 | https://github.com/dropbox/zxcvbn/blob/f07ee0f098dcc50c86fa24def70aa5fc4c19f1e6/test/test-matching.coffee | 20 | 69 |
dropbox/zxcvbn:test/test-matching.coffee:2:completion | completion | check_matches = (t, matches, pattern_names, patterns, ijs, props) ->
if typeof pattern_names is "string"
# shortcut: if checking for a list of the same type of patterns,
# allow passing a string 'pat' instead of array ['pat', 'pat', ...]
pattern_names = (pattern_names for i in [0...patterns.length])
is... | test 'matching utils', (t) ->
t.ok matching.empty []
t.notOk matching.empty [1]
t.notOk matching.empty [1, 2]
t.notOk matching.empty [[]]
t.ok matching.empty {}
t.notOk matching.empty {a: 1}
t.notOk matching.empty {0: {}}
lst = []
matching.extend lst, []
t.deepEqual lst, []
matching.extend lst, [... | CoffeeScript | CoffeeScript | dropbox/zxcvbn | test/test-matching.coffee | MIT | f07ee0f098dcc50c86fa24def70aa5fc4c19f1e6 | 15,961 | https://github.com/dropbox/zxcvbn/blob/f07ee0f098dcc50c86fa24def70aa5fc4c19f1e6/test/test-matching.coffee | 20 | 69 |
dropbox/zxcvbn:test/test-matching.coffee:3:raw_corpus | raw_corpus | t.equal matching.translate('abc', chr_map), 'ABc'
t.equal matching.translate('aa', chr_map), 'AA'
t.equal matching.translate('abab', chr_map), 'ABAB'
t.equal matching.translate('', chr_map), ''
t.equal matching.translate('', {}), ''
t.equal matching.translate('abc', {}), 'abc'
t.equal matching.mod(0, 1), 0... | CoffeeScript | dropbox/zxcvbn | test/test-matching.coffee | MIT | f07ee0f098dcc50c86fa24def70aa5fc4c19f1e6 | 15,961 | https://github.com/dropbox/zxcvbn/blob/f07ee0f098dcc50c86fa24def70aa5fc4c19f1e6/test/test-matching.coffee | 70 | 119 | ||
dropbox/zxcvbn:test/test-matching.coffee:3:completion | completion | t.equal matching.translate('abc', chr_map), 'ABc'
t.equal matching.translate('aa', chr_map), 'AA'
t.equal matching.translate('abab', chr_map), 'ABAB'
t.equal matching.translate('', chr_map), ''
t.equal matching.translate('', {}), ''
t.equal matching.translate('abc', {}), 'abc'
t.equal matching.mod(0, 1), 0... | test 'sequence matching', (t) ->
t.deepEqual matching.sequence_match(''), []
t.deepEqual matching.sequence_match('a'), []
t.deepEqual matching.sequence_match('1'), []
matches = matching.sequence_match('abcbabc')
check_matches t, matches, 'sequence', ['abc', 'cba', 'abc'], [[0, 2], [2, 4], [4, 6]],
ascendi... | CoffeeScript | CoffeeScript | dropbox/zxcvbn | test/test-matching.coffee | MIT | f07ee0f098dcc50c86fa24def70aa5fc4c19f1e6 | 15,961 | https://github.com/dropbox/zxcvbn/blob/f07ee0f098dcc50c86fa24def70aa5fc4c19f1e6/test/test-matching.coffee | 70 | 119 |
dropbox/zxcvbn:test/test-matching.coffee:4:raw_corpus | raw_corpus | ['01234', 'digits', true]
['43210', 'digits', false]
['67890', 'digits', true]
['09876', 'digits', false]
]
for [password, i, j] in genpws pattern, prefixes, suffixes
matches = matching.sequence_match password
check_matches t, matches, 'sequence', [pattern], [[i, j]],
sequence_na... | CoffeeScript | dropbox/zxcvbn | test/test-matching.coffee | MIT | f07ee0f098dcc50c86fa24def70aa5fc4c19f1e6 | 15,961 | https://github.com/dropbox/zxcvbn/blob/f07ee0f098dcc50c86fa24def70aa5fc4c19f1e6/test/test-matching.coffee | 120 | 152 | ||
dropbox/zxcvbn:test/test-matching.coffee:4:completion | completion | ['01234', 'digits', true]
['43210', 'digits', false]
['67890', 'digits', true]
['09876', 'digits', false]
]
for [password, i, j] in genpws pattern, prefixes, suffixes
matches = matching.sequence_match password
check_matches t, matches, 'sequence', [pattern], [[i, j]],
sequence_na... | prefixes = ['@', 'y4@']
suffixes = ['u', 'u%7']
for length in [3, 12]
for chr in ['a', 'Z', '4', '&']
pattern = Array(length + 1).join(chr)
for [password, i, j] in genpws pattern, prefixes, suffixes
matches = matching.repeat_match password
check_matches t, matches, 'repeat', [pattern... | CoffeeScript | CoffeeScript | dropbox/zxcvbn | test/test-matching.coffee | MIT | f07ee0f098dcc50c86fa24def70aa5fc4c19f1e6 | 15,961 | https://github.com/dropbox/zxcvbn/blob/f07ee0f098dcc50c86fa24def70aa5fc4c19f1e6/test/test-matching.coffee | 120 | 152 |
dropbox/zxcvbn:test/test-matching.coffee:1:raw_corpus | raw_corpus | genpws = (pattern, prefixes, suffixes) ->
prefixes = prefixes.slice()
suffixes = suffixes.slice()
for lst in [prefixes, suffixes]
lst.unshift '' if '' not in lst
result = []
for prefix in prefixes
for suffix in suffixes
[i, j] = [prefix.length, prefix.length + pattern.length - 1]
result.pu... | CoffeeScript | dropbox/zxcvbn | test/test-matching.coffee | MIT | 805bed0225eeefc173fce1beee33db17411448a0 | 15,961 | https://github.com/dropbox/zxcvbn/blob/805bed0225eeefc173fce1beee33db17411448a0/test/test-matching.coffee | 8 | 57 | ||
dropbox/zxcvbn:test/test-matching.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
genpws = (pattern, prefixes, suffixes) ->
prefixes = prefixes.slice()
suffixes = suffixes.slice()
for lst in [prefixes, suffixes]
lst.unshift '' if '' not in lst
result = []
for prefix in prefixes
for suffix in suffixes
[i, j] = [prefix.le... | var genpws,
indexOf = [].indexOf;
genpws = function(pattern, prefixes, suffixes) {
var i, j, k, l, len, len1, len2, lst, m, prefix, ref, result, suffix;
prefixes = prefixes.slice();
suffixes = suffixes.slice();
ref = [prefixes, suffixes];
for (k = 0, len = ref.length; k < len; k++) {
lst = ref[k];
... | CoffeeScript | JavaScript | dropbox/zxcvbn | test/test-matching.coffee | MIT | 805bed0225eeefc173fce1beee33db17411448a0 | 15,961 | https://github.com/dropbox/zxcvbn/blob/805bed0225eeefc173fce1beee33db17411448a0/test/test-matching.coffee | 8 | 57 |
dropbox/zxcvbn:test/test-matching.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var genpws,
indexOf = [].indexOf;
genpws = function(pattern, prefixes, suffixes) {
var i, j, k, l, len, len1, len2, lst, m, prefix, ref, result, suffix;
prefixes = prefixes.slice();
suffixes = suffixes.slice();
ref = [prefixes, suffixes];
for (k = 0, l... | genpws = (pattern, prefixes, suffixes) ->
prefixes = prefixes.slice()
suffixes = suffixes.slice()
for lst in [prefixes, suffixes]
lst.unshift '' if '' not in lst
result = []
for prefix in prefixes
for suffix in suffixes
[i, j] = [prefix.length, prefix.length + pattern.length - 1]
result.pu... | JavaScript | CoffeeScript | dropbox/zxcvbn | test/test-matching.coffee | MIT | 805bed0225eeefc173fce1beee33db17411448a0 | 15,961 | https://github.com/dropbox/zxcvbn/blob/805bed0225eeefc173fce1beee33db17411448a0/test/test-matching.coffee | 8 | 57 |
dropbox/zxcvbn:test/test-matching.coffee:1:completion | completion | genpws = (pattern, prefixes, suffixes) ->
prefixes = prefixes.slice()
suffixes = suffixes.slice()
for lst in [prefixes, suffixes]
lst.unshift '' if '' not in lst
result = []
for prefix in prefixes
for suffix in suffixes
[i, j] = [prefix.length, prefix.length + pattern.length - 1]
result.pu... | t.deepEqual lst, [1]
matching.extend lst, [2, 3]
t.deepEqual lst, [1, 2, 3]
[lst1, lst2] = [[1], [2]]
matching.extend lst1, lst2
t.deepEqual lst1, [1, 2]
t.deepEqual lst2, [2]
chr_map = {a: 'A', b: 'B'}
t.equal matching.translate('a', chr_map), 'A'
t.equal matching.translate('c', chr_map), 'c'
t.eq... | CoffeeScript | CoffeeScript | dropbox/zxcvbn | test/test-matching.coffee | MIT | 805bed0225eeefc173fce1beee33db17411448a0 | 15,961 | https://github.com/dropbox/zxcvbn/blob/805bed0225eeefc173fce1beee33db17411448a0/test/test-matching.coffee | 8 | 57 |
dropbox/zxcvbn:test/test-matching.coffee:2:raw_corpus | raw_corpus | test 'sequence matching', (t) ->
t.deepEqual matching.sequence_match(''), []
t.deepEqual matching.sequence_match('a'), []
t.deepEqual matching.sequence_match('1'), []
prefixes = ['!', '22', 'ttt']
suffixes = ['!', '22', 'ttt']
for [pattern, name, is_ascending] in [
['ABC', 'upper', true]
['CBA', ... | CoffeeScript | dropbox/zxcvbn | test/test-matching.coffee | MIT | 805bed0225eeefc173fce1beee33db17411448a0 | 15,961 | https://github.com/dropbox/zxcvbn/blob/805bed0225eeefc173fce1beee33db17411448a0/test/test-matching.coffee | 58 | 96 | ||
dropbox/zxcvbn:test/test-matching.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
test 'sequence matching', (t) ->
t.deepEqual matching.sequence_match(''), []
t.deepEqual matching.sequence_match('a'), []
t.deepEqual matching.sequence_match('1'), []
prefixes = ['!', '22', 'ttt']
suffixes = ['!', '22', 'ttt']
for [pattern, name, is_a... | test('sequence matching', function(t) {
var i, is_ascending, j, k, l, len, len1, match, matches, name, password, pattern, prefixes, ref, ref1, suffixes;
t.deepEqual(matching.sequence_match(''), []);
t.deepEqual(matching.sequence_match('a'), []);
t.deepEqual(matching.sequence_match('1'), []);
prefixes = ['!', ... | CoffeeScript | JavaScript | dropbox/zxcvbn | test/test-matching.coffee | MIT | 805bed0225eeefc173fce1beee33db17411448a0 | 15,961 | https://github.com/dropbox/zxcvbn/blob/805bed0225eeefc173fce1beee33db17411448a0/test/test-matching.coffee | 58 | 96 |
dropbox/zxcvbn:test/test-matching.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
test('sequence matching', function(t) {
var i, is_ascending, j, k, l, len, len1, match, matches, name, password, pattern, prefixes, ref, ref1, suffixes;
t.deepEqual(matching.sequence_match(''), []);
t.deepEqual(matching.sequence_match('a'), []);
t.deepEqual... | test 'sequence matching', (t) ->
t.deepEqual matching.sequence_match(''), []
t.deepEqual matching.sequence_match('a'), []
t.deepEqual matching.sequence_match('1'), []
prefixes = ['!', '22', 'ttt']
suffixes = ['!', '22', 'ttt']
for [pattern, name, is_ascending] in [
['ABC', 'upper', true]
['CBA', ... | JavaScript | CoffeeScript | dropbox/zxcvbn | test/test-matching.coffee | MIT | 805bed0225eeefc173fce1beee33db17411448a0 | 15,961 | https://github.com/dropbox/zxcvbn/blob/805bed0225eeefc173fce1beee33db17411448a0/test/test-matching.coffee | 58 | 96 |
dropbox/zxcvbn:test/test-matching.coffee:2:completion | completion | test 'sequence matching', (t) ->
t.deepEqual matching.sequence_match(''), []
t.deepEqual matching.sequence_match('a'), []
t.deepEqual matching.sequence_match('1'), []
prefixes = ['!', '22', 'ttt']
suffixes = ['!', '22', 'ttt']
for [pattern, name, is_ascending] in [
['ABC', 'upper', true]
['CBA', ... | ['01234', 'digits', true]
['43210', 'digits', false]
['67890', 'digits', true]
['09876', 'digits', false]
]
for [password, i, j] in genpws pattern, prefixes, suffixes
matches = matching.sequence_match password
t.equal matches.length, 1
match = matches[0]
t.equal match.pattern... | CoffeeScript | CoffeeScript | dropbox/zxcvbn | test/test-matching.coffee | MIT | 805bed0225eeefc173fce1beee33db17411448a0 | 15,961 | https://github.com/dropbox/zxcvbn/blob/805bed0225eeefc173fce1beee33db17411448a0/test/test-matching.coffee | 58 | 96 |
buttercoin/buttercoin:lib/ews/websocket_listener.coffee:1:raw_corpus | raw_corpus | Q = require('q')
WebSocketServer = require('ws').Server
stump = require('stump')
Connection = require('./websocket_connection')
module.exports = class WebsocketListener
constructor: (@options) ->
stump.stumpify(@, @constructor.name)
@options.protocol_factory = @options.protocol_factory or @make_protocol
... | CoffeeScript | buttercoin/buttercoin | lib/ews/websocket_listener.coffee | MIT | 52c6e4cc60ff0e7f36592783c4e298bec7c5ec76 | 663 | https://github.com/buttercoin/buttercoin/blob/52c6e4cc60ff0e7f36592783c4e298bec7c5ec76/lib/ews/websocket_listener.coffee | 1 | 40 | ||
buttercoin/buttercoin:lib/ews/websocket_listener.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
Q = require('q')
WebSocketServer = require('ws').Server
stump = require('stump')
Connection = require('./websocket_connection')
module.exports = class WebsocketListener
constructor: (@options) ->
stump.stumpify(@, @constructor.name)
@options.protocol_... | var Connection, Q, WebSocketServer, WebsocketListener, listener, stump;
Q = require('q');
WebSocketServer = require('ws').Server;
stump = require('stump');
Connection = require('./websocket_connection');
module.exports = WebsocketListener = class WebsocketListener {
constructor(options) {
this.listen = this.... | CoffeeScript | JavaScript | buttercoin/buttercoin | lib/ews/websocket_listener.coffee | MIT | 52c6e4cc60ff0e7f36592783c4e298bec7c5ec76 | 663 | https://github.com/buttercoin/buttercoin/blob/52c6e4cc60ff0e7f36592783c4e298bec7c5ec76/lib/ews/websocket_listener.coffee | 1 | 40 |
buttercoin/buttercoin:lib/ews/websocket_listener.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Connection, Q, WebSocketServer, WebsocketListener, listener, stump;
Q = require('q');
WebSocketServer = require('ws').Server;
stump = require('stump');
Connection = require('./websocket_connection');
module.exports = WebsocketListener = class WebsocketList... | Q = require('q')
WebSocketServer = require('ws').Server
stump = require('stump')
Connection = require('./websocket_connection')
module.exports = class WebsocketListener
constructor: (@options) ->
stump.stumpify(@, @constructor.name)
@options.protocol_factory = @options.protocol_factory or @make_protocol
... | JavaScript | CoffeeScript | buttercoin/buttercoin | lib/ews/websocket_listener.coffee | MIT | 52c6e4cc60ff0e7f36592783c4e298bec7c5ec76 | 663 | https://github.com/buttercoin/buttercoin/blob/52c6e4cc60ff0e7f36592783c4e298bec7c5ec76/lib/ews/websocket_listener.coffee | 1 | 40 |
buttercoin/buttercoin:lib/ews/websocket_listener.coffee:1:completion | completion | Q = require('q')
WebSocketServer = require('ws').Server
stump = require('stump')
Connection = require('./websocket_connection')
module.exports = class WebsocketListener
constructor: (@options) ->
stump.stumpify(@, @constructor.name)
@options.protocol_factory = @options.protocol_factory or @make_protocol
... | @wss.close()
connection_made: (ws) =>
conn = new Connection(@)
conn.once('open', @establish_protocol)
conn.socket_accepted(ws)
connect_error: (err) =>
@error('connect error', err)
establish_protocol: (connection) =>
@options.protocol_factory(connection)
make_protocol: (connection) =>
... | CoffeeScript | CoffeeScript | buttercoin/buttercoin | lib/ews/websocket_listener.coffee | MIT | 52c6e4cc60ff0e7f36592783c4e298bec7c5ec76 | 663 | https://github.com/buttercoin/buttercoin/blob/52c6e4cc60ff0e7f36592783c4e298bec7c5ec76/lib/ews/websocket_listener.coffee | 1 | 40 |
buttercoin/buttercoin:lib/ews/websocket_listener.coffee:1:raw_corpus | raw_corpus | Q = require('q')
WebSocketServer = require('ws').Server
stump = require('stump')
Connection = require('./websocket_connection')
# Protocol = require('./protocol')
module.exports = class WebsocketListener
constructor: (@options) ->
stump.stumpify(@, @constructor.name)
listen: =>
@info 'LISTENING'
retu... | CoffeeScript | buttercoin/buttercoin | lib/ews/websocket_listener.coffee | MIT | 3ece68f78e0927ac5ce7f0357a8c4fd11c88894b | 663 | https://github.com/buttercoin/buttercoin/blob/3ece68f78e0927ac5ce7f0357a8c4fd11c88894b/lib/ews/websocket_listener.coffee | 1 | 39 | ||
buttercoin/buttercoin:lib/ews/websocket_listener.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
Q = require('q')
WebSocketServer = require('ws').Server
stump = require('stump')
Connection = require('./websocket_connection')
# Protocol = require('./protocol')
module.exports = class WebsocketListener
constructor: (@options) ->
stump.stumpify(@, @const... | var Connection, Q, WebSocketServer, WebsocketListener, listener, stump;
Q = require('q');
WebSocketServer = require('ws').Server;
stump = require('stump');
Connection = require('./websocket_connection');
// Protocol = require('./protocol')
module.exports = WebsocketListener = class WebsocketListener {
constructo... | CoffeeScript | JavaScript | buttercoin/buttercoin | lib/ews/websocket_listener.coffee | MIT | 3ece68f78e0927ac5ce7f0357a8c4fd11c88894b | 663 | https://github.com/buttercoin/buttercoin/blob/3ece68f78e0927ac5ce7f0357a8c4fd11c88894b/lib/ews/websocket_listener.coffee | 1 | 39 |
buttercoin/buttercoin:lib/ews/websocket_listener.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Connection, Q, WebSocketServer, WebsocketListener, listener, stump;
Q = require('q');
WebSocketServer = require('ws').Server;
stump = require('stump');
Connection = require('./websocket_connection');
// Protocol = require('./protocol')
module.exports = Web... | Q = require('q')
WebSocketServer = require('ws').Server
stump = require('stump')
Connection = require('./websocket_connection')
# Protocol = require('./protocol')
module.exports = class WebsocketListener
constructor: (@options) ->
stump.stumpify(@, @constructor.name)
listen: =>
@info 'LISTENING'
retu... | JavaScript | CoffeeScript | buttercoin/buttercoin | lib/ews/websocket_listener.coffee | MIT | 3ece68f78e0927ac5ce7f0357a8c4fd11c88894b | 663 | https://github.com/buttercoin/buttercoin/blob/3ece68f78e0927ac5ce7f0357a8c4fd11c88894b/lib/ews/websocket_listener.coffee | 1 | 39 |
buttercoin/buttercoin:lib/ews/websocket_listener.coffee:1:completion | completion | Q = require('q')
WebSocketServer = require('ws').Server
stump = require('stump')
Connection = require('./websocket_connection')
# Protocol = require('./protocol')
module.exports = class WebsocketListener
constructor: (@options) ->
stump.stumpify(@, @constructor.name)
listen: =>
@info 'LISTENING'
retu... | Q.fcall =>
@wss.close()
connection_made: (ws) =>
conn = new Connection(@)
conn.once('open', @establish_protocol)
conn.socket_accepted(ws)
connect_error: (err) =>
@error('connect error', err)
establish_protocol: (connection) =>
@info 'Making protocol'
connection.on('parsed_data', (... | CoffeeScript | CoffeeScript | buttercoin/buttercoin | lib/ews/websocket_listener.coffee | MIT | 3ece68f78e0927ac5ce7f0357a8c4fd11c88894b | 663 | https://github.com/buttercoin/buttercoin/blob/3ece68f78e0927ac5ce7f0357a8c4fd11c88894b/lib/ews/websocket_listener.coffee | 1 | 39 |
buttercoin/buttercoin:lib/ews/websocket_listener.coffee:1:raw_corpus | raw_corpus | Q = require('q')
WebSocketServer = require('ws').Server
stump = require('stump')
Connection = require('./websocket_connection')
# Protocol = require('./protocol')
module.exports = class WebsocketListener
constructor: (@options) ->
stump.stumpify(@, @constructor.name)
listen: =>
@info 'LISTENING'
retu... | CoffeeScript | buttercoin/buttercoin | lib/ews/websocket_listener.coffee | MIT | 52bf87ca00ba3bd7f29e07abfad68be5112fae0d | 663 | https://github.com/buttercoin/buttercoin/blob/52bf87ca00ba3bd7f29e07abfad68be5112fae0d/lib/ews/websocket_listener.coffee | 1 | 36 | ||
buttercoin/buttercoin:lib/ews/websocket_listener.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
Q = require('q')
WebSocketServer = require('ws').Server
stump = require('stump')
Connection = require('./websocket_connection')
# Protocol = require('./protocol')
module.exports = class WebsocketListener
constructor: (@options) ->
stump.stumpify(@, @const... | var Connection, Q, WebSocketServer, WebsocketListener, listener, stump;
Q = require('q');
WebSocketServer = require('ws').Server;
stump = require('stump');
Connection = require('./websocket_connection');
// Protocol = require('./protocol')
module.exports = WebsocketListener = class WebsocketListener {
constructo... | CoffeeScript | JavaScript | buttercoin/buttercoin | lib/ews/websocket_listener.coffee | MIT | 52bf87ca00ba3bd7f29e07abfad68be5112fae0d | 663 | https://github.com/buttercoin/buttercoin/blob/52bf87ca00ba3bd7f29e07abfad68be5112fae0d/lib/ews/websocket_listener.coffee | 1 | 36 |
buttercoin/buttercoin:lib/ews/websocket_listener.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Connection, Q, WebSocketServer, WebsocketListener, listener, stump;
Q = require('q');
WebSocketServer = require('ws').Server;
stump = require('stump');
Connection = require('./websocket_connection');
// Protocol = require('./protocol')
module.exports = Web... | Q = require('q')
WebSocketServer = require('ws').Server
stump = require('stump')
Connection = require('./websocket_connection')
# Protocol = require('./protocol')
module.exports = class WebsocketListener
constructor: (@options) ->
stump.stumpify(@, @constructor.name)
listen: =>
@info 'LISTENING'
retu... | JavaScript | CoffeeScript | buttercoin/buttercoin | lib/ews/websocket_listener.coffee | MIT | 52bf87ca00ba3bd7f29e07abfad68be5112fae0d | 663 | https://github.com/buttercoin/buttercoin/blob/52bf87ca00ba3bd7f29e07abfad68be5112fae0d/lib/ews/websocket_listener.coffee | 1 | 36 |
buttercoin/buttercoin:lib/ews/websocket_listener.coffee:1:completion | completion | Q = require('q')
WebSocketServer = require('ws').Server
stump = require('stump')
Connection = require('./websocket_connection')
# Protocol = require('./protocol')
module.exports = class WebsocketListener
constructor: (@options) ->
stump.stumpify(@, @constructor.name)
listen: =>
@info 'LISTENING'
retu... | close: =>
Q.fcall =>
@wss.close()
connection_made: (ws) =>
conn = new Connection(@)
conn.once('open', @establish_protocol)
conn.socket_accepted(ws)
connect_error: (err) =>
@error('connect error', err)
establish_protocol: (connection) =>
@info 'Making protocol'
if !module.parent
... | CoffeeScript | CoffeeScript | buttercoin/buttercoin | lib/ews/websocket_listener.coffee | MIT | 52bf87ca00ba3bd7f29e07abfad68be5112fae0d | 663 | https://github.com/buttercoin/buttercoin/blob/52bf87ca00ba3bd7f29e07abfad68be5112fae0d/lib/ews/websocket_listener.coffee | 1 | 36 |
buttercoin/buttercoin:lib/datastore/currency.coffee:1:raw_corpus | raw_corpus | Amount = require('./amount')
module.exports = class Currency
constructor: ->
@balance = new Amount()
increase_balance: (amount) =>
@balance = @balance.add(amount)
get_balance: =>
return @balance | CoffeeScript | buttercoin/buttercoin | lib/datastore/currency.coffee | MIT | 890fe3dba37c2c3ec6d8102a22ea68525bb5dc1a | 663 | https://github.com/buttercoin/buttercoin/blob/890fe3dba37c2c3ec6d8102a22ea68525bb5dc1a/lib/datastore/currency.coffee | 1 | 11 | ||
buttercoin/buttercoin:lib/datastore/currency.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
Amount = require('./amount')
module.exports = class Currency
constructor: ->
@balance = new Amount()
increase_balance: (amount) =>
@balance = @balance.add(amount)
get_balance: =>
return @balance
``` | var Amount, Currency;
Amount = require('./amount');
module.exports = Currency = class Currency {
constructor() {
this.increase_balance = this.increase_balance.bind(this);
this.get_balance = this.get_balance.bind(this);
this.balance = new Amount();
}
increase_balance(amount) {
return this.balanc... | CoffeeScript | JavaScript | buttercoin/buttercoin | lib/datastore/currency.coffee | MIT | 890fe3dba37c2c3ec6d8102a22ea68525bb5dc1a | 663 | https://github.com/buttercoin/buttercoin/blob/890fe3dba37c2c3ec6d8102a22ea68525bb5dc1a/lib/datastore/currency.coffee | 1 | 11 |
buttercoin/buttercoin:lib/datastore/currency.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Amount, Currency;
Amount = require('./amount');
module.exports = Currency = class Currency {
constructor() {
this.increase_balance = this.increase_balance.bind(this);
this.get_balance = this.get_balance.bind(this);
this.balance = new Amount();
... | Amount = require('./amount')
module.exports = class Currency
constructor: ->
@balance = new Amount()
increase_balance: (amount) =>
@balance = @balance.add(amount)
get_balance: =>
return @balance | JavaScript | CoffeeScript | buttercoin/buttercoin | lib/datastore/currency.coffee | MIT | 890fe3dba37c2c3ec6d8102a22ea68525bb5dc1a | 663 | https://github.com/buttercoin/buttercoin/blob/890fe3dba37c2c3ec6d8102a22ea68525bb5dc1a/lib/datastore/currency.coffee | 1 | 11 |
buttercoin/buttercoin:lib/datastore/currency.coffee:1:completion | completion | Amount = require('./amount')
module.exports = class Currency
constructor: ->
@balance = new Amount() | increase_balance: (amount) =>
@balance = @balance.add(amount)
get_balance: =>
return @balance | CoffeeScript | CoffeeScript | buttercoin/buttercoin | lib/datastore/currency.coffee | MIT | 890fe3dba37c2c3ec6d8102a22ea68525bb5dc1a | 663 | https://github.com/buttercoin/buttercoin/blob/890fe3dba37c2c3ec6d8102a22ea68525bb5dc1a/lib/datastore/currency.coffee | 1 | 11 |
linemanjs/lineman:config/plugins/uglify.coffee:1:raw_corpus | raw_corpus | module.exports = (lineman) ->
config:
uglify:
options:
banner: "<%= meta.banner %>"
js:
files:
"<%= files.js.minified %>": "<%= files.js.concatenated %>" | CoffeeScript | linemanjs/lineman | config/plugins/uglify.coffee | MIT | 61d681532d9621e578d319c279006bbb728ece4b | 1,168 | https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/config/plugins/uglify.coffee | 1 | 8 | ||
linemanjs/lineman:config/plugins/uglify.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = (lineman) ->
config:
uglify:
options:
banner: "<%= meta.banner %>"
js:
files:
"<%= files.js.minified %>": "<%= files.js.concatenated %>"
``` | module.exports = function(lineman) {
return {
config: {
uglify: {
options: {
banner: "<%= meta.banner %>"
},
js: {
files: {
"<%= files.js.minified %>": "<%= files.js.concatenated %>"
}
}
}
}
};
}; | CoffeeScript | JavaScript | linemanjs/lineman | config/plugins/uglify.coffee | MIT | 61d681532d9621e578d319c279006bbb728ece4b | 1,168 | https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/config/plugins/uglify.coffee | 1 | 8 |
linemanjs/lineman:config/plugins/uglify.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
module.exports = function(lineman) {
return {
config: {
uglify: {
options: {
banner: "<%= meta.banner %>"
},
js: {
files: {
"<%= files.js.minified %>": "<%= files.js.concatenated %>"
}
... | module.exports = (lineman) ->
config:
uglify:
options:
banner: "<%= meta.banner %>"
js:
files:
"<%= files.js.minified %>": "<%= files.js.concatenated %>" | JavaScript | CoffeeScript | linemanjs/lineman | config/plugins/uglify.coffee | MIT | 61d681532d9621e578d319c279006bbb728ece4b | 1,168 | https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/config/plugins/uglify.coffee | 1 | 8 |
linemanjs/lineman:config/plugins/uglify.coffee:1:completion | completion | module.exports = (lineman) ->
config:
uglify:
options: | banner: "<%= meta.banner %>"
js:
files:
"<%= files.js.minified %>": "<%= files.js.concatenated %>" | CoffeeScript | CoffeeScript | linemanjs/lineman | config/plugins/uglify.coffee | MIT | 61d681532d9621e578d319c279006bbb728ece4b | 1,168 | https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/config/plugins/uglify.coffee | 1 | 8 |
linemanjs/lineman:config/plugins/uglify.coffee:1:raw_corpus | raw_corpus | module.exports = (lineman) ->
config:
options:
banner: "<%= meta.banner %>"
js:
files:
"<%= files.js.minified %>": "<%= files.js.concatenated %>" | CoffeeScript | linemanjs/lineman | config/plugins/uglify.coffee | MIT | 94365fc4e4b804de8672585c254895fbd9cb514e | 1,168 | https://github.com/linemanjs/lineman/blob/94365fc4e4b804de8672585c254895fbd9cb514e/config/plugins/uglify.coffee | 1 | 7 | ||
linemanjs/lineman:config/plugins/uglify.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = (lineman) ->
config:
options:
banner: "<%= meta.banner %>"
js:
files:
"<%= files.js.minified %>": "<%= files.js.concatenated %>"
``` | module.exports = function(lineman) {
return {
config: {
options: {
banner: "<%= meta.banner %>"
},
js: {
files: {
"<%= files.js.minified %>": "<%= files.js.concatenated %>"
}
}
}
};
}; | CoffeeScript | JavaScript | linemanjs/lineman | config/plugins/uglify.coffee | MIT | 94365fc4e4b804de8672585c254895fbd9cb514e | 1,168 | https://github.com/linemanjs/lineman/blob/94365fc4e4b804de8672585c254895fbd9cb514e/config/plugins/uglify.coffee | 1 | 7 |
linemanjs/lineman:config/plugins/uglify.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
module.exports = function(lineman) {
return {
config: {
options: {
banner: "<%= meta.banner %>"
},
js: {
files: {
"<%= files.js.minified %>": "<%= files.js.concatenated %>"
}
}
}
};
};
``` | module.exports = (lineman) ->
config:
options:
banner: "<%= meta.banner %>"
js:
files:
"<%= files.js.minified %>": "<%= files.js.concatenated %>" | JavaScript | CoffeeScript | linemanjs/lineman | config/plugins/uglify.coffee | MIT | 94365fc4e4b804de8672585c254895fbd9cb514e | 1,168 | https://github.com/linemanjs/lineman/blob/94365fc4e4b804de8672585c254895fbd9cb514e/config/plugins/uglify.coffee | 1 | 7 |
linemanjs/lineman:config/plugins/uglify.coffee:1:completion | completion | module.exports = (lineman) ->
config:
options: | banner: "<%= meta.banner %>"
js:
files:
"<%= files.js.minified %>": "<%= files.js.concatenated %>" | CoffeeScript | CoffeeScript | linemanjs/lineman | config/plugins/uglify.coffee | MIT | 94365fc4e4b804de8672585c254895fbd9cb514e | 1,168 | https://github.com/linemanjs/lineman/blob/94365fc4e4b804de8672585c254895fbd9cb514e/config/plugins/uglify.coffee | 1 | 7 |
yakyak/yakyak:src/ui/views/notifications.coffee:1:raw_corpus | raw_corpus | module.exports = (models) ->
{conv, notify, entity, viewstate} = models
tonot = notify.popToNotify()
visibleFocused = await ipc.invoke 'mainwindow:isvisibleandfocused'
quietIf = (c, chat_id) -> visibleFocused or conv.isQuiet(c) or entity.isSelf(chat_id)
tonot.forEach (msg) ->
conv_id = msg... | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd | 3,762 | https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/src/ui/views/notifications.coffee | 22 | 71 | ||
yakyak/yakyak:src/ui/views/notifications.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = (models) ->
{conv, notify, entity, viewstate} = models
tonot = notify.popToNotify()
visibleFocused = await ipc.invoke 'mainwindow:isvisibleandfocused'
quietIf = (c, chat_id) -> visibleFocused or conv.isQuiet(c) or entity.isSelf(c... | module.exports = async function(models) {
var conv, entity, notify, quietIf, tonot, viewstate, visibleFocused;
({conv, notify, entity, viewstate} = models);
tonot = notify.popToNotify();
visibleFocused = (await ipc.invoke('mainwindow:isvisibleandfocused'));
quietIf = function(c, chat_id) {
return visibleF... | CoffeeScript | JavaScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd | 3,762 | https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/src/ui/views/notifications.coffee | 22 | 71 |
yakyak/yakyak:src/ui/views/notifications.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
module.exports = async function(models) {
var conv, entity, notify, quietIf, tonot, viewstate, visibleFocused;
({conv, notify, entity, viewstate} = models);
tonot = notify.popToNotify();
visibleFocused = (await ipc.invoke('mainwindow:isvisibleandfocused'));... | module.exports = (models) ->
{conv, notify, entity, viewstate} = models
tonot = notify.popToNotify()
visibleFocused = await ipc.invoke 'mainwindow:isvisibleandfocused'
quietIf = (c, chat_id) -> visibleFocused or conv.isQuiet(c) or entity.isSelf(chat_id)
tonot.forEach (msg) ->
conv_id = msg... | JavaScript | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd | 3,762 | https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/src/ui/views/notifications.coffee | 22 | 71 |
yakyak/yakyak:src/ui/views/notifications.coffee:1:completion | completion | module.exports = (models) ->
{conv, notify, entity, viewstate} = models
tonot = notify.popToNotify()
visibleFocused = await ipc.invoke 'mainwindow:isvisibleandfocused'
quietIf = (c, chat_id) -> visibleFocused or conv.isQuiet(c) or entity.isSelf(chat_id)
tonot.forEach (msg) ->
conv_id = msg... | html: "#{i18n.__('call.incoming_from:Incoming call from %s', sender)}. " +
"<a href=\"#\" class=\"accept\">#{i18n.__ 'call.accept:Accept'}</a> / " +
"<a href=\"#\" class=\"reject\">#{i18n.__ 'call.reject:Reject'}</a>"
stay: 0
id: "hang#{conv_id}"
... | CoffeeScript | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd | 3,762 | https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/src/ui/views/notifications.coffee | 22 | 71 |
yakyak/yakyak:src/ui/views/notifications.coffee:2:raw_corpus | raw_corpus | if viewstate.showPopUpNotifications and not visibleFocused
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = path.join __dirname, '..', '..', 'icons', 'icon@8.png'
# Only for NotificationCenter (darwin)
if isNotificationCenter &... | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd | 3,762 | https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/src/ui/views/notifications.coffee | 72 | 118 | ||
yakyak/yakyak:src/ui/views/notifications.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
if viewstate.showPopUpNotifications and not visibleFocused
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = path.join __dirname, '..', '..', 'icons', 'icon@8.png'
# Only for Notifica... | var contentImage, dataFile, icon, isNotificationCenter, ref;
if (viewstate.showPopUpNotifications && !visibleFocused) {
isNotificationCenter = notifier.constructor.name === 'NotificationCenter';
icon = path.join(__dirname, '..', '..', 'icons', 'icon@8.png');
// Only for NotificationCenter (darwin)
if (isNotif... | CoffeeScript | JavaScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd | 3,762 | https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/src/ui/views/notifications.coffee | 72 | 118 |
yakyak/yakyak:src/ui/views/notifications.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var contentImage, dataFile, icon, isNotificationCenter, ref;
if (viewstate.showPopUpNotifications && !visibleFocused) {
isNotificationCenter = notifier.constructor.name === 'NotificationCenter';
icon = path.join(__dirname, '..', '..', 'icons', 'icon@8.png');
... | if viewstate.showPopUpNotifications and not visibleFocused
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = path.join __dirname, '..', '..', 'icons', 'icon@8.png'
# Only for NotificationCenter (darwin)
if isNotificationCenter &... | JavaScript | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd | 3,762 | https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/src/ui/views/notifications.coffee | 72 | 118 |
yakyak/yakyak:src/ui/views/notifications.coffee:2:completion | completion | if viewstate.showPopUpNotifications and not visibleFocused
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = path.join __dirname, '..', '..', 'icons', 'icon@8.png'
# Only for NotificationCenter (darwin)
if isNotificationCenter &... | sound: !viewstate.muteSoundNotification && (notifierSupportsSound && !viewstate.forceCustomSound)
icon: icon if !isNotificationCenter && viewstate.showIconNotification
contentImage: contentImage
, (err, res) ->
if res?.trim().match(/Activate/i)
a... | CoffeeScript | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd | 3,762 | https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/src/ui/views/notifications.coffee | 72 | 118 |
yakyak/yakyak:src/ui/views/notifications.coffee:3:raw_corpus | raw_corpus | textMessage = (cont, proxied, showMessage = true) ->
if cont?.segment?
unless showMessage
i18n.__('conversation.new_message:New message received')
else
segs = for seg, i in cont?.segment ? []
continue if proxied and i < 2
continue unless seg.text
... | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd | 3,762 | https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/src/ui/views/notifications.coffee | 120 | 131 | ||
yakyak/yakyak:src/ui/views/notifications.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
textMessage = (cont, proxied, showMessage = true) ->
if cont?.segment?
unless showMessage
i18n.__('conversation.new_message:New message received')
else
segs = for seg, i in cont?.segment ? []
continue if proxied a... | var textMessage;
textMessage = function(cont, proxied, showMessage = true) {
var i, seg, segs;
if ((cont != null ? cont.segment : void 0) != null) {
if (!showMessage) {
return i18n.__('conversation.new_message:New message received');
} else {
segs = (function() {
var j, len, ref, ref1, ... | CoffeeScript | JavaScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd | 3,762 | https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/src/ui/views/notifications.coffee | 120 | 131 |
yakyak/yakyak:src/ui/views/notifications.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var textMessage;
textMessage = function(cont, proxied, showMessage = true) {
var i, seg, segs;
if ((cont != null ? cont.segment : void 0) != null) {
if (!showMessage) {
return i18n.__('conversation.new_message:New message received');
} else {
... | textMessage = (cont, proxied, showMessage = true) ->
if cont?.segment?
unless showMessage
i18n.__('conversation.new_message:New message received')
else
segs = for seg, i in cont?.segment ? []
continue if proxied and i < 2
continue unless seg.text
... | JavaScript | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd | 3,762 | https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/src/ui/views/notifications.coffee | 120 | 131 |
yakyak/yakyak:src/ui/views/notifications.coffee:3:completion | completion | textMessage = (cont, proxied, showMessage = true) ->
if cont?.segment?
unless showMessage
i18n.__('conversation.new_message:New message received')
else
segs = for seg, i in cont?.segment ? [] | continue if proxied and i < 2
continue unless seg.text
seg.text
segs.join('')
else if cont?.attachment?
i18n.__('conversation.new_attachment:New message received (image or video)') | CoffeeScript | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd | 3,762 | https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/src/ui/views/notifications.coffee | 120 | 131 |
yakyak/yakyak:src/ui/views/notifications.coffee:2:raw_corpus | raw_corpus | if viewstate.showPopUpNotifications and not visibleFocused
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = path.join __dirname, '..', '..', 'icons', 'icon@8.png'
# Only for NotificationCenter (darwin)
if isNotificationCenter &... | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | a8ab6ca5ec6681fa761a05a01377742fdae131fb | 3,762 | https://github.com/yakyak/yakyak/blob/a8ab6ca5ec6681fa761a05a01377742fdae131fb/src/ui/views/notifications.coffee | 72 | 121 | ||
yakyak/yakyak:src/ui/views/notifications.coffee:2:completion | completion | if viewstate.showPopUpNotifications and not visibleFocused
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = path.join __dirname, '..', '..', 'icons', 'icon@8.png'
# Only for NotificationCenter (darwin)
if isNotificationCenter &... | contentImage: contentImage
, (err, res) ->
if res?.trim().match(/Activate/i)
action 'appfocus'
action 'selectConv', c
# only play if it is not playing already
# and notifier does not support sound or force custom sound is set
... | CoffeeScript | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | a8ab6ca5ec6681fa761a05a01377742fdae131fb | 3,762 | https://github.com/yakyak/yakyak/blob/a8ab6ca5ec6681fa761a05a01377742fdae131fb/src/ui/views/notifications.coffee | 72 | 121 |
yakyak/yakyak:src/ui/views/notifications.coffee:2:raw_corpus | raw_corpus | if viewstate.showPopUpNotifications and not visibleFocused
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = path.join __dirname, '..', '..', 'icons', 'icon@8.png'
# Only for NotificationCenter (darwin)
if isNotificationCenter &... | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 4e333efc6678e49908611dc33f5f054b62845904 | 3,762 | https://github.com/yakyak/yakyak/blob/4e333efc6678e49908611dc33f5f054b62845904/src/ui/views/notifications.coffee | 71 | 110 | ||
yakyak/yakyak:src/ui/views/notifications.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
if viewstate.showPopUpNotifications and not visibleFocused
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = path.join __dirname, '..', '..', 'icons', 'icon@8.png'
# Only for Notifica... | var contentImage, icon, isNotificationCenter, ref;
if (viewstate.showPopUpNotifications && !visibleFocused) {
isNotificationCenter = notifier.constructor.name === 'NotificationCenter';
icon = path.join(__dirname, '..', '..', 'icons', 'icon@8.png');
// Only for NotificationCenter (darwin)
if (isNotificationCen... | CoffeeScript | JavaScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 4e333efc6678e49908611dc33f5f054b62845904 | 3,762 | https://github.com/yakyak/yakyak/blob/4e333efc6678e49908611dc33f5f054b62845904/src/ui/views/notifications.coffee | 71 | 110 |
yakyak/yakyak:src/ui/views/notifications.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var contentImage, icon, isNotificationCenter, ref;
if (viewstate.showPopUpNotifications && !visibleFocused) {
isNotificationCenter = notifier.constructor.name === 'NotificationCenter';
icon = path.join(__dirname, '..', '..', 'icons', 'icon@8.png');
// Only ... | if viewstate.showPopUpNotifications and not visibleFocused
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = path.join __dirname, '..', '..', 'icons', 'icon@8.png'
# Only for NotificationCenter (darwin)
if isNotificationCenter &... | JavaScript | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 4e333efc6678e49908611dc33f5f054b62845904 | 3,762 | https://github.com/yakyak/yakyak/blob/4e333efc6678e49908611dc33f5f054b62845904/src/ui/views/notifications.coffee | 71 | 110 |
yakyak/yakyak:src/ui/views/notifications.coffee:2:completion | completion | if viewstate.showPopUpNotifications and not visibleFocused
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = path.join __dirname, '..', '..', 'icons', 'icon@8.png'
# Only for NotificationCenter (darwin)
if isNotificationCenter &... | hint: "int:transient:1"
category: 'im.received'
sender: 'com.github.yakyak'
sound: !viewstate.muteSoundNotification && (notifierSupportsSound && !viewstate.forceCustomSound)
icon: icon if !isNotificationCenter && viewstate.showIconNotification
... | CoffeeScript | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 4e333efc6678e49908611dc33f5f054b62845904 | 3,762 | https://github.com/yakyak/yakyak/blob/4e333efc6678e49908611dc33f5f054b62845904/src/ui/views/notifications.coffee | 71 | 110 |
yakyak/yakyak:src/ui/views/notifications.coffee:1:raw_corpus | raw_corpus | module.exports = (models) ->
{conv, notify, entity, viewstate} = models
tonot = notify.popToNotify()
visibleFocused = ipc.sendSync 'mainwindow:isvisibleandfocused'
quietIf = (c, chat_id) -> visibleFocused or conv.isQuiet(c) or entity.isSelf(chat_id)
tonot.forEach (msg) ->
conv_id = msg?.co... | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 7c1a06cc377196464459c3c38f32e1c11a177ac7 | 3,762 | https://github.com/yakyak/yakyak/blob/7c1a06cc377196464459c3c38f32e1c11a177ac7/src/ui/views/notifications.coffee | 21 | 70 | ||
yakyak/yakyak:src/ui/views/notifications.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = (models) ->
{conv, notify, entity, viewstate} = models
tonot = notify.popToNotify()
visibleFocused = ipc.sendSync 'mainwindow:isvisibleandfocused'
quietIf = (c, chat_id) -> visibleFocused or conv.isQuiet(c) or entity.isSelf(chat_... | module.exports = function(models) {
var conv, entity, notify, quietIf, tonot, viewstate, visibleFocused;
({conv, notify, entity, viewstate} = models);
tonot = notify.popToNotify();
visibleFocused = ipc.sendSync('mainwindow:isvisibleandfocused');
quietIf = function(c, chat_id) {
return visibleFocused || co... | CoffeeScript | JavaScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 7c1a06cc377196464459c3c38f32e1c11a177ac7 | 3,762 | https://github.com/yakyak/yakyak/blob/7c1a06cc377196464459c3c38f32e1c11a177ac7/src/ui/views/notifications.coffee | 21 | 70 |
yakyak/yakyak:src/ui/views/notifications.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
module.exports = function(models) {
var conv, entity, notify, quietIf, tonot, viewstate, visibleFocused;
({conv, notify, entity, viewstate} = models);
tonot = notify.popToNotify();
visibleFocused = ipc.sendSync('mainwindow:isvisibleandfocused');
quietIf =... | module.exports = (models) ->
{conv, notify, entity, viewstate} = models
tonot = notify.popToNotify()
visibleFocused = ipc.sendSync 'mainwindow:isvisibleandfocused'
quietIf = (c, chat_id) -> visibleFocused or conv.isQuiet(c) or entity.isSelf(chat_id)
tonot.forEach (msg) ->
conv_id = msg?.co... | JavaScript | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 7c1a06cc377196464459c3c38f32e1c11a177ac7 | 3,762 | https://github.com/yakyak/yakyak/blob/7c1a06cc377196464459c3c38f32e1c11a177ac7/src/ui/views/notifications.coffee | 21 | 70 |
yakyak/yakyak:src/ui/views/notifications.coffee:1:completion | completion | module.exports = (models) ->
{conv, notify, entity, viewstate} = models
tonot = notify.popToNotify()
visibleFocused = ipc.sendSync 'mainwindow:isvisibleandfocused'
quietIf = (c, chat_id) -> visibleFocused or conv.isQuiet(c) or entity.isSelf(chat_id)
tonot.forEach (msg) ->
conv_id = msg?.co... | html: "#{i18n.__('call.incoming_from:Incoming call from %s', sender)}. " +
"<a href=\"#\" class=\"accept\">#{i18n.__ 'call.accept:Accept'}</a> / " +
"<a href=\"#\" class=\"reject\">#{i18n.__ 'call.reject:Reject'}</a>"
stay: 0
id: "hang#{conv_id}"
... | CoffeeScript | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 7c1a06cc377196464459c3c38f32e1c11a177ac7 | 3,762 | https://github.com/yakyak/yakyak/blob/7c1a06cc377196464459c3c38f32e1c11a177ac7/src/ui/views/notifications.coffee | 21 | 70 |
yakyak/yakyak:src/ui/views/notifications.coffee:2:raw_corpus | raw_corpus | if viewstate.showPopUpNotifications and not visibleFocused
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = path.join __dirname, '..', '..', 'icons', 'icon@8.png'
# Only for NotificationCenter (darwin)
if isNotificationCenter &... | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 7c1a06cc377196464459c3c38f32e1c11a177ac7 | 3,762 | https://github.com/yakyak/yakyak/blob/7c1a06cc377196464459c3c38f32e1c11a177ac7/src/ui/views/notifications.coffee | 71 | 111 | ||
yakyak/yakyak:src/ui/views/notifications.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
if viewstate.showPopUpNotifications and not visibleFocused
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = path.join __dirname, '..', '..', 'icons', 'icon@8.png'
# Only for Notifica... | var contentImage, icon, isNotificationCenter, ref;
if (viewstate.showPopUpNotifications && !visibleFocused) {
isNotificationCenter = notifier.constructor.name === 'NotificationCenter';
icon = path.join(__dirname, '..', '..', 'icons', 'icon@8.png');
// Only for NotificationCenter (darwin)
if (isNotificationCen... | CoffeeScript | JavaScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 7c1a06cc377196464459c3c38f32e1c11a177ac7 | 3,762 | https://github.com/yakyak/yakyak/blob/7c1a06cc377196464459c3c38f32e1c11a177ac7/src/ui/views/notifications.coffee | 71 | 111 |
yakyak/yakyak:src/ui/views/notifications.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var contentImage, icon, isNotificationCenter, ref;
if (viewstate.showPopUpNotifications && !visibleFocused) {
isNotificationCenter = notifier.constructor.name === 'NotificationCenter';
icon = path.join(__dirname, '..', '..', 'icons', 'icon@8.png');
// Only ... | if viewstate.showPopUpNotifications and not visibleFocused
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = path.join __dirname, '..', '..', 'icons', 'icon@8.png'
# Only for NotificationCenter (darwin)
if isNotificationCenter &... | JavaScript | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 7c1a06cc377196464459c3c38f32e1c11a177ac7 | 3,762 | https://github.com/yakyak/yakyak/blob/7c1a06cc377196464459c3c38f32e1c11a177ac7/src/ui/views/notifications.coffee | 71 | 111 |
yakyak/yakyak:src/ui/views/notifications.coffee:2:completion | completion | if viewstate.showPopUpNotifications and not visibleFocused
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = path.join __dirname, '..', '..', 'icons', 'icon@8.png'
# Only for NotificationCenter (darwin)
if isNotificationCenter &... | hint: "int:transient:1"
category: 'im.received'
sender: 'com.github.yakyak'
sound: !viewstate.muteSoundNotification && (notifierSupportsSound && !viewstate.forceCustomSound)
icon: icon if !isNotificationCenter && viewstate.showIconNotification
... | CoffeeScript | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 7c1a06cc377196464459c3c38f32e1c11a177ac7 | 3,762 | https://github.com/yakyak/yakyak/blob/7c1a06cc377196464459c3c38f32e1c11a177ac7/src/ui/views/notifications.coffee | 71 | 111 |
yakyak/yakyak:src/ui/views/notifications.coffee:1:raw_corpus | raw_corpus | module.exports = (models) ->
{conv, notify, entity, viewstate} = models
tonot = notify.popToNotify()
ipc.invoke("mainwindow.visibleandfocused").then (visibleFocused) ->
quietIf = (c, chat_id) -> visibleFocused or conv.isQuiet(c) or entity.isSelf(chat_id)
tonot.forEach (msg) ->
... | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 637de30240821cbf6ed71c5069d95350706f8876 | 3,762 | https://github.com/yakyak/yakyak/blob/637de30240821cbf6ed71c5069d95350706f8876/src/ui/views/notifications.coffee | 21 | 70 | ||
yakyak/yakyak:src/ui/views/notifications.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = (models) ->
{conv, notify, entity, viewstate} = models
tonot = notify.popToNotify()
ipc.invoke("mainwindow.visibleandfocused").then (visibleFocused) ->
quietIf = (c, chat_id) -> visibleFocused or conv.isQuiet(c) or entity.isS... | module.exports = function(models) {
var conv, entity, notify, tonot, viewstate;
({conv, notify, entity, viewstate} = models);
tonot = notify.popToNotify();
return ipc.invoke("mainwindow.visibleandfocused").then(function(visibleFocused) {
var quietIf;
quietIf = function(c, chat_id) {
return visible... | CoffeeScript | JavaScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 637de30240821cbf6ed71c5069d95350706f8876 | 3,762 | https://github.com/yakyak/yakyak/blob/637de30240821cbf6ed71c5069d95350706f8876/src/ui/views/notifications.coffee | 21 | 70 |
yakyak/yakyak:src/ui/views/notifications.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
module.exports = function(models) {
var conv, entity, notify, tonot, viewstate;
({conv, notify, entity, viewstate} = models);
tonot = notify.popToNotify();
return ipc.invoke("mainwindow.visibleandfocused").then(function(visibleFocused) {
var quietIf;
... | module.exports = (models) ->
{conv, notify, entity, viewstate} = models
tonot = notify.popToNotify()
ipc.invoke("mainwindow.visibleandfocused").then (visibleFocused) ->
quietIf = (c, chat_id) -> visibleFocused or conv.isQuiet(c) or entity.isSelf(chat_id)
tonot.forEach (msg) ->
... | JavaScript | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 637de30240821cbf6ed71c5069d95350706f8876 | 3,762 | https://github.com/yakyak/yakyak/blob/637de30240821cbf6ed71c5069d95350706f8876/src/ui/views/notifications.coffee | 21 | 70 |
yakyak/yakyak:src/ui/views/notifications.coffee:1:completion | completion | module.exports = (models) ->
{conv, notify, entity, viewstate} = models
tonot = notify.popToNotify()
ipc.invoke("mainwindow.visibleandfocused").then (visibleFocused) ->
quietIf = (c, chat_id) -> visibleFocused or conv.isQuiet(c) or entity.isSelf(chat_id)
tonot.forEach (msg) ->
... | html: "#{i18n.__('call.incoming_from:Incoming call from %s', sender)}. " +
"<a href=\"#\" class=\"accept\">#{i18n.__ 'call.accept:Accept'}</a> / " +
"<a href=\"#\" class=\"reject\">#{i18n.__ 'call.reject:Reject'}</a>"
stay: 0
id: "hang#{con... | CoffeeScript | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 637de30240821cbf6ed71c5069d95350706f8876 | 3,762 | https://github.com/yakyak/yakyak/blob/637de30240821cbf6ed71c5069d95350706f8876/src/ui/views/notifications.coffee | 21 | 70 |
yakyak/yakyak:src/ui/views/notifications.coffee:2:raw_corpus | raw_corpus | if viewstate.showPopUpNotifications and not visibleFocused
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = path.join __dirname, '..', '..', 'icons', 'icon@8.png'
# Only for NotificationCenter (darwin)
if is... | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 637de30240821cbf6ed71c5069d95350706f8876 | 3,762 | https://github.com/yakyak/yakyak/blob/637de30240821cbf6ed71c5069d95350706f8876/src/ui/views/notifications.coffee | 71 | 110 | ||
yakyak/yakyak:src/ui/views/notifications.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
if viewstate.showPopUpNotifications and not visibleFocused
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = path.join __dirname, '..', '..', 'icons', 'icon@8.png'
# O... | var contentImage, icon, isNotificationCenter, ref;
if (viewstate.showPopUpNotifications && !visibleFocused) {
isNotificationCenter = notifier.constructor.name === 'NotificationCenter';
icon = path.join(__dirname, '..', '..', 'icons', 'icon@8.png');
// Only for NotificationCenter (darwin)
if (isNotificationCen... | CoffeeScript | JavaScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 637de30240821cbf6ed71c5069d95350706f8876 | 3,762 | https://github.com/yakyak/yakyak/blob/637de30240821cbf6ed71c5069d95350706f8876/src/ui/views/notifications.coffee | 71 | 110 |
yakyak/yakyak:src/ui/views/notifications.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var contentImage, icon, isNotificationCenter, ref;
if (viewstate.showPopUpNotifications && !visibleFocused) {
isNotificationCenter = notifier.constructor.name === 'NotificationCenter';
icon = path.join(__dirname, '..', '..', 'icons', 'icon@8.png');
// Only ... | if viewstate.showPopUpNotifications and not visibleFocused
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = path.join __dirname, '..', '..', 'icons', 'icon@8.png'
# Only for NotificationCenter (darwin)
if is... | JavaScript | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 637de30240821cbf6ed71c5069d95350706f8876 | 3,762 | https://github.com/yakyak/yakyak/blob/637de30240821cbf6ed71c5069d95350706f8876/src/ui/views/notifications.coffee | 71 | 110 |
yakyak/yakyak:src/ui/views/notifications.coffee:2:completion | completion | if viewstate.showPopUpNotifications and not visibleFocused
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = path.join __dirname, '..', '..', 'icons', 'icon@8.png'
# Only for NotificationCenter (darwin)
if is... | hint: "int:transient:1"
category: 'im.received'
sender: 'com.github.yakyak'
sound: !viewstate.muteSoundNotification && (notifierSupportsSound && !viewstate.forceCustomSound)
icon: icon if !isNotificationCenter && viewstate.showIconNotificat... | CoffeeScript | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 637de30240821cbf6ed71c5069d95350706f8876 | 3,762 | https://github.com/yakyak/yakyak/blob/637de30240821cbf6ed71c5069d95350706f8876/src/ui/views/notifications.coffee | 71 | 110 |
yakyak/yakyak:src/ui/views/notifications.coffee:1:raw_corpus | raw_corpus | module.exports = (models) ->
{conv, notify, entity, viewstate} = models
tonot = notify.popToNotify()
# And we hope we don't get another 'currentWindow' ;)
mainWindow = remote.getCurrentWindow()
quietIf = (c, chat_id) -> (mainWindow.isVisible() and mainWindow.isFocused()) or conv.isQuiet(c) or enti... | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 119a42673b8b3fc7927eeb6ed1fcb442db246671 | 3,762 | https://github.com/yakyak/yakyak/blob/119a42673b8b3fc7927eeb6ed1fcb442db246671/src/ui/views/notifications.coffee | 21 | 70 | ||
yakyak/yakyak:src/ui/views/notifications.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = (models) ->
{conv, notify, entity, viewstate} = models
tonot = notify.popToNotify()
# And we hope we don't get another 'currentWindow' ;)
mainWindow = remote.getCurrentWindow()
quietIf = (c, chat_id) -> (mainWindow.isVisible... | module.exports = function(models) {
var conv, entity, mainWindow, notify, quietIf, tonot, viewstate;
({conv, notify, entity, viewstate} = models);
tonot = notify.popToNotify();
// And we hope we don't get another 'currentWindow' ;)
mainWindow = remote.getCurrentWindow();
quietIf = function(c, chat_id) {
... | CoffeeScript | JavaScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 119a42673b8b3fc7927eeb6ed1fcb442db246671 | 3,762 | https://github.com/yakyak/yakyak/blob/119a42673b8b3fc7927eeb6ed1fcb442db246671/src/ui/views/notifications.coffee | 21 | 70 |
yakyak/yakyak:src/ui/views/notifications.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
module.exports = function(models) {
var conv, entity, mainWindow, notify, quietIf, tonot, viewstate;
({conv, notify, entity, viewstate} = models);
tonot = notify.popToNotify();
// And we hope we don't get another 'currentWindow' ;)
mainWindow = remote.get... | module.exports = (models) ->
{conv, notify, entity, viewstate} = models
tonot = notify.popToNotify()
# And we hope we don't get another 'currentWindow' ;)
mainWindow = remote.getCurrentWindow()
quietIf = (c, chat_id) -> (mainWindow.isVisible() and mainWindow.isFocused()) or conv.isQuiet(c) or enti... | JavaScript | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 119a42673b8b3fc7927eeb6ed1fcb442db246671 | 3,762 | https://github.com/yakyak/yakyak/blob/119a42673b8b3fc7927eeb6ed1fcb442db246671/src/ui/views/notifications.coffee | 21 | 70 |
yakyak/yakyak:src/ui/views/notifications.coffee:1:completion | completion | module.exports = (models) ->
{conv, notify, entity, viewstate} = models
tonot = notify.popToNotify()
# And we hope we don't get another 'currentWindow' ;)
mainWindow = remote.getCurrentWindow()
quietIf = (c, chat_id) -> (mainWindow.isVisible() and mainWindow.isFocused()) or conv.isQuiet(c) or enti... | notr
html: "#{i18n.__('call.incoming_from:Incoming call from %s', sender)}. " +
"<a href=\"#\" class=\"accept\">#{i18n.__ 'call.accept:Accept'}</a> / " +
"<a href=\"#\" class=\"reject\">#{i18n.__ 'call.reject:Reject'}</a>"
stay: 0
id: "hang... | CoffeeScript | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 119a42673b8b3fc7927eeb6ed1fcb442db246671 | 3,762 | https://github.com/yakyak/yakyak/blob/119a42673b8b3fc7927eeb6ed1fcb442db246671/src/ui/views/notifications.coffee | 21 | 70 |
yakyak/yakyak:src/ui/views/notifications.coffee:2:raw_corpus | raw_corpus | return if !text or quietIf(c, chat_id)
if viewstate.showPopUpNotifications and not (mainWindow.isVisible() and mainWindow.isFocused())
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = path.join __dirname, '..', '..', 'icons', 'icon@8.png'
... | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 119a42673b8b3fc7927eeb6ed1fcb442db246671 | 3,762 | https://github.com/yakyak/yakyak/blob/119a42673b8b3fc7927eeb6ed1fcb442db246671/src/ui/views/notifications.coffee | 71 | 112 | ||
yakyak/yakyak:src/ui/views/notifications.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
return if !text or quietIf(c, chat_id)
if viewstate.showPopUpNotifications and not (mainWindow.isVisible() and mainWindow.isFocused())
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = p... | var contentImage, icon, isNotificationCenter, ref;
if (!text || quietIf(c, chat_id)) {
if (viewstate.showPopUpNotifications && !(mainWindow.isVisible() && mainWindow.isFocused())) {
isNotificationCenter = notifier.constructor.name === 'NotificationCenter';
icon = path.join(__dirname, '..', '..', 'icons', 'i... | CoffeeScript | JavaScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 119a42673b8b3fc7927eeb6ed1fcb442db246671 | 3,762 | https://github.com/yakyak/yakyak/blob/119a42673b8b3fc7927eeb6ed1fcb442db246671/src/ui/views/notifications.coffee | 71 | 112 |
yakyak/yakyak:src/ui/views/notifications.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var contentImage, icon, isNotificationCenter, ref;
if (!text || quietIf(c, chat_id)) {
if (viewstate.showPopUpNotifications && !(mainWindow.isVisible() && mainWindow.isFocused())) {
isNotificationCenter = notifier.constructor.name === 'NotificationCenter';
... | return if !text or quietIf(c, chat_id)
if viewstate.showPopUpNotifications and not (mainWindow.isVisible() and mainWindow.isFocused())
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = path.join __dirname, '..', '..', 'icons', 'icon@8.png'
... | JavaScript | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 119a42673b8b3fc7927eeb6ed1fcb442db246671 | 3,762 | https://github.com/yakyak/yakyak/blob/119a42673b8b3fc7927eeb6ed1fcb442db246671/src/ui/views/notifications.coffee | 71 | 112 |
yakyak/yakyak:src/ui/views/notifications.coffee:2:completion | completion | return if !text or quietIf(c, chat_id)
if viewstate.showPopUpNotifications and not (mainWindow.isVisible() and mainWindow.isFocused())
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = path.join __dirname, '..', '..', 'icons', 'icon@8.png'
... | wait: true
hint: "int:transient:1"
category: 'im.received'
sender: 'com.github.yakyak'
sound: !viewstate.muteSoundNotification && (notifierSupportsSound && !viewstate.forceCustomSound)
icon: icon if !isNotificationCenter && viewstate.showIc... | CoffeeScript | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 119a42673b8b3fc7927eeb6ed1fcb442db246671 | 3,762 | https://github.com/yakyak/yakyak/blob/119a42673b8b3fc7927eeb6ed1fcb442db246671/src/ui/views/notifications.coffee | 71 | 112 |
yakyak/yakyak:src/ui/views/notifications.coffee:2:raw_corpus | raw_corpus | return if !text or quietIf(c, chat_id)
if viewstate.showPopUpNotifications and not (mainWindow.isVisible() and mainWindow.isFocused())
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = path.join __dirname, '..', '..', 'icons', 'icon@8.png'
... | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 359c1d53d3757304af30fdf337945bca1e7a89a8 | 3,762 | https://github.com/yakyak/yakyak/blob/359c1d53d3757304af30fdf337945bca1e7a89a8/src/ui/views/notifications.coffee | 71 | 112 | ||
yakyak/yakyak:src/ui/views/notifications.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
return if !text or quietIf(c, chat_id)
if viewstate.showPopUpNotifications and not (mainWindow.isVisible() and mainWindow.isFocused())
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = p... | var contentImage, icon, isNotificationCenter, ref;
if (!text || quietIf(c, chat_id)) {
if (viewstate.showPopUpNotifications && !(mainWindow.isVisible() && mainWindow.isFocused())) {
isNotificationCenter = notifier.constructor.name === 'NotificationCenter';
icon = path.join(__dirname, '..', '..', 'icons', 'i... | CoffeeScript | JavaScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 359c1d53d3757304af30fdf337945bca1e7a89a8 | 3,762 | https://github.com/yakyak/yakyak/blob/359c1d53d3757304af30fdf337945bca1e7a89a8/src/ui/views/notifications.coffee | 71 | 112 |
yakyak/yakyak:src/ui/views/notifications.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var contentImage, icon, isNotificationCenter, ref;
if (!text || quietIf(c, chat_id)) {
if (viewstate.showPopUpNotifications && !(mainWindow.isVisible() && mainWindow.isFocused())) {
isNotificationCenter = notifier.constructor.name === 'NotificationCenter';
... | return if !text or quietIf(c, chat_id)
if viewstate.showPopUpNotifications and not (mainWindow.isVisible() and mainWindow.isFocused())
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = path.join __dirname, '..', '..', 'icons', 'icon@8.png'
... | JavaScript | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 359c1d53d3757304af30fdf337945bca1e7a89a8 | 3,762 | https://github.com/yakyak/yakyak/blob/359c1d53d3757304af30fdf337945bca1e7a89a8/src/ui/views/notifications.coffee | 71 | 112 |
yakyak/yakyak:src/ui/views/notifications.coffee:2:completion | completion | return if !text or quietIf(c, chat_id)
if viewstate.showPopUpNotifications and not (mainWindow.isVisible() and mainWindow.isFocused())
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = path.join __dirname, '..', '..', 'icons', 'icon@8.png'
... | wait: true
hint: "int:transient:1"
category: 'im.received'
sender: 'com.github.yakyak'
sound: !viewstate.muteSoundNotification && (notifierSupportsSound && !viewstate.forceCustomSound)
icon: icon if !isNotificationCenter && viewstate.showIc... | CoffeeScript | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 359c1d53d3757304af30fdf337945bca1e7a89a8 | 3,762 | https://github.com/yakyak/yakyak/blob/359c1d53d3757304af30fdf337945bca1e7a89a8/src/ui/views/notifications.coffee | 71 | 112 |
yakyak/yakyak:src/ui/views/notifications.coffee:2:raw_corpus | raw_corpus | return if !text or quietIf(c, chat_id)
if viewstate.showPopUpNotifications and not (mainWindow.isVisible() and mainWindow.isFocused())
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = path.join __dirname, '..', '..', 'icons', 'icon@8.png'
... | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 809315976234c0723bac2adc807efc51734573b1 | 3,762 | https://github.com/yakyak/yakyak/blob/809315976234c0723bac2adc807efc51734573b1/src/ui/views/notifications.coffee | 71 | 113 | ||
yakyak/yakyak:src/ui/views/notifications.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
return if !text or quietIf(c, chat_id)
if viewstate.showPopUpNotifications and not (mainWindow.isVisible() and mainWindow.isFocused())
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = p... | var contentImage, icon, isNotificationCenter, ref;
if (!text || quietIf(c, chat_id)) {
if (viewstate.showPopUpNotifications && !(mainWindow.isVisible() && mainWindow.isFocused())) {
isNotificationCenter = notifier.constructor.name === 'NotificationCenter';
icon = path.join(__dirname, '..', '..', 'icons', 'i... | CoffeeScript | JavaScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 809315976234c0723bac2adc807efc51734573b1 | 3,762 | https://github.com/yakyak/yakyak/blob/809315976234c0723bac2adc807efc51734573b1/src/ui/views/notifications.coffee | 71 | 113 |
yakyak/yakyak:src/ui/views/notifications.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var contentImage, icon, isNotificationCenter, ref;
if (!text || quietIf(c, chat_id)) {
if (viewstate.showPopUpNotifications && !(mainWindow.isVisible() && mainWindow.isFocused())) {
isNotificationCenter = notifier.constructor.name === 'NotificationCenter';
... | return if !text or quietIf(c, chat_id)
if viewstate.showPopUpNotifications and not (mainWindow.isVisible() and mainWindow.isFocused())
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = path.join __dirname, '..', '..', 'icons', 'icon@8.png'
... | JavaScript | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 809315976234c0723bac2adc807efc51734573b1 | 3,762 | https://github.com/yakyak/yakyak/blob/809315976234c0723bac2adc807efc51734573b1/src/ui/views/notifications.coffee | 71 | 113 |
yakyak/yakyak:src/ui/views/notifications.coffee:2:completion | completion | return if !text or quietIf(c, chat_id)
if viewstate.showPopUpNotifications and not (mainWindow.isVisible() and mainWindow.isFocused())
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = path.join __dirname, '..', '..', 'icons', 'icon@8.png'
... | wait: true
hint: "int:transient:1"
category: 'im.received'
sender: 'com.github.yakyak'
sound: !viewstate.muteSoundNotification && (notifierSupportsSound && !viewstate.forceCustomSound)
icon: icon if !isNotificationCenter && viewstate.showIc... | CoffeeScript | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 809315976234c0723bac2adc807efc51734573b1 | 3,762 | https://github.com/yakyak/yakyak/blob/809315976234c0723bac2adc807efc51734573b1/src/ui/views/notifications.coffee | 71 | 113 |
yakyak/yakyak:src/ui/views/notifications.coffee:2:raw_corpus | raw_corpus | return if !text or quietIf(c, chat_id)
if viewstate.showPopUpNotifications and not (mainWindow.isVisible() and mainWindow.isFocused())
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = path.join __dirname, '..', '..', 'icons', 'icon@8.png'
... | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | d84226a6256cf50509121fae2b17c135e14b40dd | 3,762 | https://github.com/yakyak/yakyak/blob/d84226a6256cf50509121fae2b17c135e14b40dd/src/ui/views/notifications.coffee | 71 | 113 | ||
yakyak/yakyak:src/ui/views/notifications.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
return if !text or quietIf(c, chat_id)
if viewstate.showPopUpNotifications and not (mainWindow.isVisible() and mainWindow.isFocused())
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = p... | var contentImage, icon, isNotificationCenter, ref;
if (!text || quietIf(c, chat_id)) {
if (viewstate.showPopUpNotifications && !(mainWindow.isVisible() && mainWindow.isFocused())) {
isNotificationCenter = notifier.constructor.name === 'NotificationCenter';
icon = path.join(__dirname, '..', '..', 'icons', 'i... | CoffeeScript | JavaScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | d84226a6256cf50509121fae2b17c135e14b40dd | 3,762 | https://github.com/yakyak/yakyak/blob/d84226a6256cf50509121fae2b17c135e14b40dd/src/ui/views/notifications.coffee | 71 | 113 |
yakyak/yakyak:src/ui/views/notifications.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var contentImage, icon, isNotificationCenter, ref;
if (!text || quietIf(c, chat_id)) {
if (viewstate.showPopUpNotifications && !(mainWindow.isVisible() && mainWindow.isFocused())) {
isNotificationCenter = notifier.constructor.name === 'NotificationCenter';
... | return if !text or quietIf(c, chat_id)
if viewstate.showPopUpNotifications and not (mainWindow.isVisible() and mainWindow.isFocused())
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = path.join __dirname, '..', '..', 'icons', 'icon@8.png'
... | JavaScript | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | d84226a6256cf50509121fae2b17c135e14b40dd | 3,762 | https://github.com/yakyak/yakyak/blob/d84226a6256cf50509121fae2b17c135e14b40dd/src/ui/views/notifications.coffee | 71 | 113 |
yakyak/yakyak:src/ui/views/notifications.coffee:2:completion | completion | return if !text or quietIf(c, chat_id)
if viewstate.showPopUpNotifications and not (mainWindow.isVisible() and mainWindow.isFocused())
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = path.join __dirname, '..', '..', 'icons', 'icon@8.png'
... | wait: true
hint: "int:transient:1"
category: 'im.received'
sender: 'com.github.yakyak'
sound: !viewstate.muteSoundNotification && (notifierSupportsSound && !viewstate.forceCustomSound)
icon: icon if !isNotificationCenter && viewstate.showIc... | CoffeeScript | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | d84226a6256cf50509121fae2b17c135e14b40dd | 3,762 | https://github.com/yakyak/yakyak/blob/d84226a6256cf50509121fae2b17c135e14b40dd/src/ui/views/notifications.coffee | 71 | 113 |
yakyak/yakyak:src/ui/views/notifications.coffee:2:raw_corpus | raw_corpus | return if !text or quietIf(c, chat_id)
if viewstate.showPopUpNotifications and not (mainWindow.isVisible() and mainWindow.isFocused())
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = path.join __dirname, '..', '..', 'icons', 'icon@8.png'
... | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 6636b53b648b32eefdeb7f37bebcb7866fa19562 | 3,762 | https://github.com/yakyak/yakyak/blob/6636b53b648b32eefdeb7f37bebcb7866fa19562/src/ui/views/notifications.coffee | 71 | 112 | ||
yakyak/yakyak:src/ui/views/notifications.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
return if !text or quietIf(c, chat_id)
if viewstate.showPopUpNotifications and not (mainWindow.isVisible() and mainWindow.isFocused())
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = p... | var contentImage, icon, isNotificationCenter, ref;
if (!text || quietIf(c, chat_id)) {
if (viewstate.showPopUpNotifications && !(mainWindow.isVisible() && mainWindow.isFocused())) {
isNotificationCenter = notifier.constructor.name === 'NotificationCenter';
icon = path.join(__dirname, '..', '..', 'icons', 'i... | CoffeeScript | JavaScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 6636b53b648b32eefdeb7f37bebcb7866fa19562 | 3,762 | https://github.com/yakyak/yakyak/blob/6636b53b648b32eefdeb7f37bebcb7866fa19562/src/ui/views/notifications.coffee | 71 | 112 |
yakyak/yakyak:src/ui/views/notifications.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var contentImage, icon, isNotificationCenter, ref;
if (!text || quietIf(c, chat_id)) {
if (viewstate.showPopUpNotifications && !(mainWindow.isVisible() && mainWindow.isFocused())) {
isNotificationCenter = notifier.constructor.name === 'NotificationCenter';
... | return if !text or quietIf(c, chat_id)
if viewstate.showPopUpNotifications and not (mainWindow.isVisible() and mainWindow.isFocused())
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = path.join __dirname, '..', '..', 'icons', 'icon@8.png'
... | JavaScript | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 6636b53b648b32eefdeb7f37bebcb7866fa19562 | 3,762 | https://github.com/yakyak/yakyak/blob/6636b53b648b32eefdeb7f37bebcb7866fa19562/src/ui/views/notifications.coffee | 71 | 112 |
yakyak/yakyak:src/ui/views/notifications.coffee:2:completion | completion | return if !text or quietIf(c, chat_id)
if viewstate.showPopUpNotifications and not (mainWindow.isVisible() and mainWindow.isFocused())
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = path.join __dirname, '..', '..', 'icons', 'icon@8.png'
... | wait: true
hint: "int:transient:1"
category: 'im.received'
sender: 'com.github.yakyak'
sound: !viewstate.muteSoundNotification && (notifierSupportsSound && !viewstate.forceCustomSound)
icon: icon if !isNotificationCenter && viewstate.showIc... | CoffeeScript | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | 6636b53b648b32eefdeb7f37bebcb7866fa19562 | 3,762 | https://github.com/yakyak/yakyak/blob/6636b53b648b32eefdeb7f37bebcb7866fa19562/src/ui/views/notifications.coffee | 71 | 112 |
yakyak/yakyak:src/ui/views/notifications.coffee:2:raw_corpus | raw_corpus | return if !text or quietIf(c, chat_id)
if viewstate.showPopUpNotifications and not (mainWindow.isVisible() and mainWindow.isFocused())
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = path.join __dirname, '..', '..', 'icons', 'icon@8.png'
... | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | f5f80a0116b33e2aff80d0231bb62e59e4735174 | 3,762 | https://github.com/yakyak/yakyak/blob/f5f80a0116b33e2aff80d0231bb62e59e4735174/src/ui/views/notifications.coffee | 71 | 112 | ||
yakyak/yakyak:src/ui/views/notifications.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
return if !text or quietIf(c, chat_id)
if viewstate.showPopUpNotifications and not (mainWindow.isVisible() and mainWindow.isFocused())
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = p... | var contentImage, icon, isNotificationCenter, ref;
if (!text || quietIf(c, chat_id)) {
if (viewstate.showPopUpNotifications && !(mainWindow.isVisible() && mainWindow.isFocused())) {
isNotificationCenter = notifier.constructor.name === 'NotificationCenter';
icon = path.join(__dirname, '..', '..', 'icons', 'i... | CoffeeScript | JavaScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | f5f80a0116b33e2aff80d0231bb62e59e4735174 | 3,762 | https://github.com/yakyak/yakyak/blob/f5f80a0116b33e2aff80d0231bb62e59e4735174/src/ui/views/notifications.coffee | 71 | 112 |
yakyak/yakyak:src/ui/views/notifications.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var contentImage, icon, isNotificationCenter, ref;
if (!text || quietIf(c, chat_id)) {
if (viewstate.showPopUpNotifications && !(mainWindow.isVisible() && mainWindow.isFocused())) {
isNotificationCenter = notifier.constructor.name === 'NotificationCenter';
... | return if !text or quietIf(c, chat_id)
if viewstate.showPopUpNotifications and not (mainWindow.isVisible() and mainWindow.isFocused())
isNotificationCenter = notifier.constructor.name == 'NotificationCenter'
#
icon = path.join __dirname, '..', '..', 'icons', 'icon@8.png'
... | JavaScript | CoffeeScript | yakyak/yakyak | src/ui/views/notifications.coffee | MIT | f5f80a0116b33e2aff80d0231bb62e59e4735174 | 3,762 | https://github.com/yakyak/yakyak/blob/f5f80a0116b33e2aff80d0231bb62e59e4735174/src/ui/views/notifications.coffee | 71 | 112 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.