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

Commit

Permalink
Merge branch 'master' into dev-channel
Browse files Browse the repository at this point in the history
  • Loading branch information
bbondy committed Oct 30, 2016
2 parents cbfacd2 + 3649f29 commit 46d1085
Show file tree
Hide file tree
Showing 216 changed files with 8,640 additions and 6,356 deletions.
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
runtime = electron
target = 1.4.0
target_arch = x64
brave_electron_version = 1.4.20
brave_electron_version = 1.4.22
disturl = https://atom.io/download/atom-shell
22 changes: 21 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,28 @@
# Changelog

## [0.12.7](https://github.com/brave/browser-laptop/releases/v0.12.7dev)
## [0.12.8](https://github.com/brave/browser-laptop/releases/v0.12.8dev)
- (TODO)

## [0.12.7](https://github.com/brave/browser-laptop/releases/v0.12.7dev)
- Added Google Widevine for Netflix support. ([#5131](https://github.com/brave/browser-laptop/issues/5131))([#468](https://github.com/brave/browser-laptop/issues/468))
- Added Startpage search engine. ([#3845](https://github.com/brave/browser-laptop/issues/3845))
- Added the ability to select multiple bookmarks at the same time. ([#5165](https://github.com/brave/browser-laptop/issues/5165))([#1005](https://github.com/brave/browser-laptop/issues/1005))
- Added verified icon for verified publishers ([#3467](https://github.com/brave/browser-laptop/issues/3467))
- Fixed numerous issues for the address bar. ([#4663](https://github.com/brave/browser-laptop/issues/4663))([#5025](https://github.com/brave/browser-laptop/issues/5025))
- Fixed autocomplete. ([#5043](https://github.com/brave/browser-laptop/issues/5043))([#5024](https://github.com/brave/browser-laptop/issues/5024))([#5091](https://github.com/brave/browser-laptop/issues/5091))([#4998](https://github.com/brave/browser-laptop/issues/4998))
- Fixed overzealous ad blocking. ([#4442](https://github.com/brave/browser-laptop/issues/4442))
- Fixed error page behavior. ([#5177](https://github.com/brave/browser-laptop/issues/5177))([#4984](https://github.com/brave/browser-laptop/issues/4984))
- Fixed numerous issues for bookmarks. ([#5202](https://github.com/brave/browser-laptop/issues/5202))([#5103](https://github.com/brave/browser-laptop/issues/5103))([#5032](https://github.com/brave/browser-laptop/issues/5032))
- Fixed Brave Payment wallet creation. ([#5107](https://github.com/brave/browser-laptop/issues/5107))
- Fixed remembering window position. ([#3247](https://github.com/brave/browser-laptop/issues/3247))
- Fixed fullscreen display on Windows. ([#5152](https://github.com/brave/browser-laptop/issues/5152))
- Fixed window resizing. ([#586](https://github.com/brave/browser-laptop/issues/586))
- Fixed UI for forms in app. ([#4884](https://github.com/brave/browser-laptop/issues/4884))
- Fixed Brave Payments showing wrong contribution date. ([#4058](https://github.com/brave/browser-laptop/issues/4058))
- Fixed security issue : local file read-access. ([#4906](https://github.com/brave/browser-laptop/issues/4906))
- Fixed security issue : closing windows via scripts. ([#5006](https://github.com/brave/browser-laptop/issues/5006))
- Updated to brave/electron 1.4.20. ([#5188](https://github.com/brave/browser-laptop/issues/5188))

## [0.12.6](https://github.com/brave/browser-laptop/releases/v0.12.6dev)
- Added the ability to set Brave as your default browser on startup and preferences page. ([#4937](https://github.com/brave/browser-laptop/issues/4937))([#4958](https://github.com/brave/browser-laptop/issues/4958))([#4935](https://github.com/brave/browser-laptop/issues/4935))([#4934](https://github.com/brave/browser-laptop/issues/4934))([#2105](https://github.com/brave/browser-laptop/issues/2105))([#4939](https://github.com/brave/browser-laptop/issues/4939))
- Added the option to opt-in to reporting usage stats. ([#4691](https://github.com/brave/browser-laptop/issues/4691))
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ For a more user-friendly download page, [please visit our website](https://brave
* See [CONTRIBUTING.md](.github/CONTRIBUTING.md) for tips and guidelines about contributing.
* See [docs/tests.md](docs/tests.md) for information on testing, including how to run a subset of the tests.
* See [docs/debugging.md](docs/debugging.md) for information on debugging.
* See [docs/translations.md](docs/translations.md) to learn how you can help us with translations (localization).

## Build prerequisites

Expand Down
18 changes: 18 additions & 0 deletions app/browser/extensions/contextMenus.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
const extensionActions = require('../../common/actions/extensionActions')

const contextMenus = {
init: () => {
process.on('chrome-context-menus-remove-all', (extensionId) => {
setImmediate(() => {
extensionActions.contextMenuAllRemoved(extensionId)
})
})
process.on('chrome-context-menus-create', (extensionId, menuItemId, properties) => {
setImmediate(() => {
extensionActions.contextMenuCreated(extensionId, menuItemId, properties)
})
})
}
}

module.exports = contextMenus
44 changes: 44 additions & 0 deletions app/common/actions/extensionActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,50 @@ const extensionActions = {
actionType: ExtensionConstants.EXTENSION_DISABLED,
extensionId
})
},

/**
* Dispatched when an extension has created item in context menu
*
* @param {string} extensionId - the extension id
* @param {string} menuItemId - the id of the menu item that was clicked
* @param {object} properties - createProperties of chrome.contextMenus.create
*/
contextMenuCreated: function (extensionId, menuItemId, properties) {
AppDispatcher.dispatch({
actionType: ExtensionConstants.CONTEXT_MENU_CREATED,
extensionId,
menuItemId,
properties
})
},

/**
* Dispatched when an extension has removed all item in context menu
*
* @param {string} extensionId - the extension id
*/
contextMenuAllRemoved: function (extensionId) {
AppDispatcher.dispatch({
actionType: ExtensionConstants.CONTEXT_MENU_ALL_REMOVED,
extensionId
})
},

/**
* Dispatched when an menu item created by extension is clicked
*
* @param {string} extensionId - the extension id
* @param {string} tabId - the tab id
* @param {object} info - the arg of onclick callback
*/
contextMenuClicked: function (extensionId, tabId, info) {
AppDispatcher.dispatch({
actionType: ExtensionConstants.CONTEXT_MENU_CLICKED,
extensionId,
tabId,
info
})
}
}

Expand Down
5 changes: 4 additions & 1 deletion app/common/constants/extensionConstants.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ const ExtensionConstants = {
EXTENSION_INSTALLED: _,
EXTENSION_UNINSTALLED: _,
EXTENSION_ENABLED: _,
EXTENSION_DISABLED: _
EXTENSION_DISABLED: _,
CONTEXT_MENU_CREATED: _,
CONTEXT_MENU_ALL_REMOVED: _,
CONTEXT_MENU_CLICKED: _
}

module.exports = mapValuesByKeys(ExtensionConstants)
61 changes: 56 additions & 5 deletions app/common/state/extensionState.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,17 @@ const extensionState = {
}
},

browserActionBackgroundImage: (browserAction) => {
// TODO(bridiver) - handle icon single
if (browserAction.get('base_path') && browserAction.getIn(['path', '19']) && browserAction.getIn(['path', '38'])) {
return '-webkit-image-set(url(\'' + browserAction.get('base_path') + '/' + browserAction.getIn(['path', '19']) +
'\') 1x, url(\'' + browserAction.get('base_path') + '/' + browserAction.getIn(['path', '38']) + '\') 2x'
browserActionBackgroundImage: (browserAction, tabId) => {
tabId = tabId ? tabId.toString() : '-1'
if (browserAction.get('base_path')) {
if (browserAction.getIn(['tabs', tabId, 'path', '19']) && browserAction.getIn(['tabs', tabId, 'path', '38'])) {
return '-webkit-image-set(url(\'' + browserAction.get('base_path') + '/' + browserAction.getIn(['tabs', tabId, 'path', '19']) +
'\') 1x, url(\'' + browserAction.get('base_path') + '/' + browserAction.getIn(['tabs', tabId, 'path', '38']) + '\') 2x'
}
if (browserAction.getIn(['path', '19']) && browserAction.getIn(['path', '38'])) {
return '-webkit-image-set(url(\'' + browserAction.get('base_path') + '/' + browserAction.getIn(['path', '19']) +
'\') 1x, url(\'' + browserAction.get('base_path') + '/' + browserAction.getIn(['path', '38']) + '\') 2x'
}
}
return ''
},
Expand Down Expand Up @@ -124,6 +130,51 @@ const extensionState = {
extension = extension.delete(field)
})
return extension
},

contextMenuCreated: (state, action) => {
action = makeImmutable(action)
state = makeImmutable(state)
let extensionId = action.get('extensionId').toString()
let extension = extensionState.getExtensionById(state, extensionId)
if (extension) {
if (state.getIn(['extensions', action.get('extensionId'), 'contextMenus']) === undefined) {
state = state.setIn(['extensions', action.get('extensionId'), 'contextMenus'], new Immutable.List())
}
let contextMenus = state.getIn(['extensions', action.get('extensionId'), 'contextMenus'])
return state.setIn(['extensions', action.get('extensionId'), 'contextMenus'],
contextMenus.push({
extensionId: action.get('extensionId'),
menuItemId: action.get('menuItemId'),
properties: action.get('properties').toJS()
}))
} else {
return state
}
},

contextMenuAllRemoved: (state, action) => {
action = makeImmutable(action)
state = makeImmutable(state)
let extensionId = action.get('extensionId').toString()
let extension = extensionState.getExtensionById(state, extensionId)
if (extension) {
return state.deleteIn(['extensions', action.get('extensionId'), 'contextMenus'])
} else {
return state
}
},

getContextMenusProperties: (state) => {
let allProperties = []
let extensions = extensionState.getEnabledExtensions(state)
extensions && extensions.forEach((extension) => {
let contextMenus = extension.get('contextMenus')
contextMenus && contextMenus.forEach((contextMenu) => {
allProperties.push(contextMenu.toJS())
})
})
return allProperties
}
}

Expand Down
8 changes: 8 additions & 0 deletions app/extensions.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const browserActions = require('./browser/extensions/browserActions')
const contextMenus = require('./browser/extensions/contextMenus')
const extensionActions = require('./common/actions/extensionActions')
const config = require('../js/constants/config')
const appConfig = require('../js/constants/appConfig')
Expand Down Expand Up @@ -184,6 +185,7 @@ const isWidevine = (componentId) =>

module.exports.init = () => {
browserActions.init()
contextMenus.init()

const {componentUpdater, session} = require('electron')
componentUpdater.on('component-checking-for-updates', () => {
Expand Down Expand Up @@ -317,6 +319,12 @@ module.exports.init = () => {
disableExtension(extensionIds[passwordManagers.LAST_PASS])
}

if (getSetting(settings.POCKET_ENABLED)) {
registerComponent(config.PocketExtensionId)
} else {
disableExtension(config.PocketExtensionId)
}

if (appStore.getState().getIn(['widevine', 'enabled'])) {
registerComponent(config.widevineComponentId)
}
Expand Down
20 changes: 20 additions & 0 deletions app/extensions/brave/about-style.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<html>
<head>
<meta charset="utf-8">
<meta name="availableLanguages" content="">
<meta name="defaultLanguage" content="en-US">
<meta name='theme-color' content='#4B0082'>
<link rel="shortcut icon"type="image/x-icon" href="data:image/x-icon;,">
<title data-l10n-id="styleGuide"></title>
<script src='js/about.js'></script>
<script src="ext/l20n.min.js" async></script>
<link rel="localization" href="locales/{locale}/style.properties">
</head>
<body>
<div id="appContainer"/>
</body>
</html>
1 change: 1 addition & 0 deletions app/extensions/brave/locales/.DS-Store/common.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Not Found
1 change: 1 addition & 0 deletions app/extensions/brave/locales/.DS-Store/newtab.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Not Found
15 changes: 12 additions & 3 deletions app/extensions/brave/locales/bn-BD/app.properties
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,13 @@ goToPrefs=ওপেন পছন্দসমূহ
goToAdobe=পুনরায় ইনস্টল করুন ফ্লাশ
allowFlashPlayer={{origin}} কে ফ্ল্যাশ প্লেয়ার চালানোর অনুমতি দিতে চান?
ledgerBackupText=আপনার খতিয়ান কী হয় {{পেমেন্ট আইডি}} এবং {{পরিচয়-পংক্তি}}
allowWidevine={{origin}}-কে Google Widevine চালাবার অনুমতি দেওয়া হবে?

error=সমস্যা
caseSensitivity=কেস (বড় হাতের / ছোট হাতের লেখা) মেলান
nameField=শিরোনাম:
locationField=অবস্থান:
parentFolderField=ফোল্ডার:
nameField=শিরনাম
locationField=অবস্থান
parentFolderField=ফোল্ডার
save=সংরক্ষণ করুন
rememberDecision=সিদ্ধান্তটি মনে রাখুন
bookmarksToolbar=বুকমার্ক টুলবার
Expand Down Expand Up @@ -223,3 +225,10 @@ cookies=Cookies
licenseTextOk=ঠিক আছে
closeFirefoxWarningOk=ঠিক আছে
importSuccessOk=ঠিক আছে
makeBraveDefault=Brave-কে আপনার default ব্রাউজার বানাতে তৈরী?
checkDefaultOnStartup=সবসময় শুরুতে দেখে নেওয়া হোক
useBrave=Brave ব্রাউজার ব্যবহার করুন
notNow=এখন নয়
widevinePanelTitle=সামনে এগোতে Google Widevine ইন্সটল করা প্রয়োজন
installAndAllow=ইন্সটল করে চলার অনুমতি দিন
rememberThisDecision={{origin}}-এর জন্য এই সিদ্ধান্ত বিদ্যমান থাকুক
4 changes: 3 additions & 1 deletion app/extensions/brave/locales/bn-BD/bookmarks.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ partitionNumber={{partitionNumber}} সেশন
bookmarksToolbar=বুকমার্ক টুলবার
otherBookmarks=অন্যান্য বুকমার্ক
bookmarkSearch.placeholder=বুকমার্কগুলি খুঁজুন
importBrowserData.title=ব্রাউজার ডেটা ইমপোর্ট করুন
importBrowserData.title=ব্রাউজারের তথ্য import করা হোক
allFolders= সবগুলো ফোল্ডার
addBookmarkFolder.title=ফোল্ডার যোগ করা হোক
addBookmark.title=বুকমার্ক যোগ করা হোক
16 changes: 12 additions & 4 deletions app/extensions/brave/locales/bn-BD/bravery.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,16 @@ cookieControl=কুকি নিয়ন্ত্রণ
allowAllCookies=সকল কুকি মঞ্জুর করুন
adBlock=বিজ্ঞাপন ব্লক করুন
showBraveAds=ব্রেভের বিজ্ঞপন দেখান
adsBlocked=বিজ্ঞপন এবং ট্র্যাকিং অবরুদ্ধ
scriptsBlockedNumber=স্ক্রিপ্ট অবরুদ্ধ
fingerprintingBlocked=আঙ্গুলের ছাপজনিত পদ্ধতি অবরুদ্ধ
httpReroutes=HTTPS আপগ্রেড
adsBlocked={[plural(blockedAdCount)]}
adsBlocked[one]=বিজ্ঞাপন বা ট্র্যাকার ব্লক করা হয়েছে
adsBlocked[other]=বিজ্ঞাপন আর ট্র্যাকার ব্লক করা হয়েছে
scriptsBlockedNumber={[plural(blockedScriptCount)]}
scriptsBlockedNumber[one]=স্ক্রিপ্টটি ব্লক করা হয়েছে
scriptsBlockedNumber[other]=স্ক্রিপ্ট ব্লক করা হয়েছে
fingerprintingBlocked={[plural(blockedFingerprintCount)]}
fingerprintingBlocked[one]=আঙ্গুলের ছাপ সনাক্তকারী পদ্ধতিটি ব্লক করা হয়েছে
fingerprintingBlocked[other]=আঙ্গুলের ছাপ সনাক্তকারী পদ্ধতিসমূহ ব্লক করা হয়েছে
httpReroutes={[plural(httpsUpgradeCount)]}
httpReroutes[one]=HTTPS Upgrade
httpReroutes[other]=HTTPS Upgrades
editBraveryGlobalSettings=Bravery গ্লোবাল সেটিংস সম্পাদন করুন....
2 changes: 2 additions & 0 deletions app/extensions/brave/locales/bn-BD/common.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
enableWidevineSubtext=Google Widevine is a piece of Digital Rights Management (DRM) code that we at Brave Software do not own and cannot inspect. The Google Widevine code is loaded from Google servers, not from our servers. It is loaded only when you enable this option. We discourage the use of DRM, but we respect user choice and acknowledge that some Brave users would like to use services that require it.
enableWidevineSubtext2=By clicking this checkbox, you are agreeing to the Google Widevine Terms of Use. You agree that Brave is not responsible for any damages or losses in connection with your use of Google Widevine.
13 changes: 11 additions & 2 deletions app/extensions/brave/locales/bn-BD/menu.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ closeTab=বন্ধ করুন
closeOtherTabs=বাকি ট্যাবগুলো বন্ধ করুন
bookmarkPage=পাতা বুকমার্ক করুন
bookmarkLink=এই লিঙ্কটি বুকমার্ক করুন
bookmarkAdded=Bookmark Added
bookmarkFolderAdding=New Bookmark Folder
bookmarkFolderEditing=Edit Bookmark Folder
bookmarkEdit=Edit Bookmark
bookmarkCreateNew=Create New Bookmark
openFile=ফাইল খুলুন
openLocation=অবস্থান খুলুন
openSearch=খুঁজুন "{{selectedVariable}}"
Expand All @@ -19,7 +24,9 @@ paste=পেস্ট
pasteAndGo=পেস্ট করুন এবং সাইটে যান
pasteAndSearch=পেস্ট করুন এবং সার্চ করুন
pasteWithoutFormatting=ফরম্যাটিং ছাড়াই পেস্ট করুন
delete=মুছুন
delete=Delete
done=Done
remove=Remove
selectAll=সবটুকু নির্বাচন করুন
findNext=পরেরটি খুঁজুন
findPrevious=আগেরটি খুঁজুন
Expand Down Expand Up @@ -50,6 +57,7 @@ clearSiteData=সমস্ত কুকিস এবং সাইট ডাট
recentlyClosed=সম্প্রতি বন্ধ করা হয়েছে এমন
recentlyVisited=সম্প্রতি ভিজিট করা হয়েছে এমন
bookmarks=বুকমার্ক
viewBookmarks=View all bookmarks
addToFavoritesBar=ফেভারিট বারে যুক্ত করুন
window=উইন্ডো
minimize=ছোট করুন
Expand Down Expand Up @@ -95,8 +103,9 @@ editFolder=ফোল্ডার সম্পাদন করুন
editBookmark=বুকমার্ক সম্পাদন করুন
deleteFolder=ফোল্ডার মুছে ফেলুন
deleteBookmark=বুকমার্ক মুছে ফেলুন
deleteBookmarks=নির্বাচিত বুকমার্কগুলো মুছে ফেলা হোক
deleteHistoryEntry=ব্রাউজিং ইতিহাসে থাকা তথ্য মুছুন
deleteHistoryEntries=Delete History Entries
deleteHistoryEntries=Delete Selected History Entries
deleteLedgerEntry=এই সাইটটিকে কখনই অন্তর্ভুক্ত করবেন না
stop=বন্ধ করুন
clone=ক্লোন
Expand Down
1 change: 1 addition & 0 deletions app/extensions/brave/locales/bn-BD/newtab.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Not Found
Loading

0 comments on commit 46d1085

Please sign in to comment.