Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
added emoji-regex in package.json, modified urlBar.js to remove emoji
Browse files Browse the repository at this point in the history
  • Loading branch information
prasanthp96 committed Aug 3, 2017
1 parent ac8a6df commit 581a779
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/renderer/components/navigation/urlBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const publisherUtil = require('../../../common/lib/publisherUtil')

// Icons
const iconNoScript = require('../../../../img/url-bar-no-script.svg')
const emojiRegex = require('emoji-regex')

class UrlBar extends React.Component {
constructor (props) {
Expand Down Expand Up @@ -374,7 +375,7 @@ class UrlBar extends React.Component {
// For about:newtab we don't want the top of the browser saying New Tab
// Instead just show "Brave"
return ['about:blank', 'about:newtab'].includes(this.props.urlbarLocation)
? '' : this.props.title
? '' : this.props.title.replace(emojiRegex(), '')
}

get loadTime () {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
"clipboard-copy": "^1.0.0",
"electron-localshortcut": "^0.6.0",
"electron-squirrel-startup": "brave/electron-squirrel-startup",
"emoji-regex": "^6.5.1",
"file-loader": "^0.8.5",
"font-awesome": "^4.5.0",
"font-awesome-webpack": "0.0.4",
Expand Down

0 comments on commit 581a779

Please sign in to comment.