Skip to content

Commit

Permalink
Don't show an option to pin about:blank and about:newtab
Browse files Browse the repository at this point in the history
  • Loading branch information
darkdh committed Jun 26, 2016
1 parent 3c7dfbb commit 7035500
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions js/contextMenus.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const locale = require('../js/l10n')
const getSetting = require('./settings').getSetting
const settings = require('./constants/settings')
const textUtils = require('./lib/text')
const {isUrl} = require('./lib/appUrlUtil')
const {isIntermediateAboutPage, isUrl} = require('./lib/appUrlUtil')

const isDarwin = process.platform === 'darwin'

Expand Down Expand Up @@ -358,14 +358,15 @@ function tabTemplateInit (frameProps) {

if (!frameProps.get('isPrivate')) {
const isPinned = frameProps.get('pinnedLocation')

items.push({
label: locale.translation(isPinned ? 'unpinTab' : 'pinTab'),
click: (item) => {
// Handle converting the current tab window into a pinned site
windowActions.setPinned(frameProps, !isPinned)
}
})
var location = frameProps.get('location');
if (!(location === 'about:blank' || location == 'about:newtab' || isIntermediateAboutPage(location)))
items.push({
label: locale.translation(isPinned ? 'unpinTab' : 'pinTab'),
click: (item) => {
// Handle converting the current tab window into a pinned site
windowActions.setPinned(frameProps, !isPinned)
}
})
}

// items.push({
Expand Down

0 comments on commit 7035500

Please sign in to comment.