Browse Source

[bugfix] join the count back again after stripping special chars

pull/92/head
Eduard Mayer 9 years ago
parent
commit
e45f7d387c
  1. 7
      app/ux/WebView.js

7
app/ux/WebView.js

@ -120,9 +120,10 @@ Ext.define('Rambox.ux.WebView',{
webview.addEventListener("page-title-updated", function(e) {
var count = e.title.match(/\(([^)]+)\)/); // Get text between (...)
count = count ? count[1] : '0';
count = count.match(/\d+/g); // Some services have special characters. Example: (•)
count = count ? parseInt(count[0]) : 0;
count = count ? count[1] : '0';
count = count.match(/\d+/g).join(""); // Some services have special characters. Example: (•)
count = count ? parseInt(count) : 0;
switch ( me.type ) {
case 'messenger':

Loading…
Cancel
Save