-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Artur Skowronski
committed
Feb 24, 2017
1 parent
adfb237
commit 741cca5
Showing
7 changed files
with
44 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +0,0 @@ | ||
const hideIfExists = function (clazz) { | ||
const element = document.getElementsByClassName(clazz)[0]; | ||
if (element) { | ||
element.style.display = 'none'; | ||
} | ||
}; | ||
|
||
window.onload = function () { | ||
hideIfExists('gb_gc'); | ||
hideIfExists('gb_Qb'); | ||
hideIfExists('gb_5b'); | ||
}; | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
const shell = require('electron').shell; | ||
const url = require('url'); | ||
|
||
const webview = document.getElementById('keep-webview'); | ||
|
||
const openLinkInNewWindow = (e) => { | ||
const protocol = url.parse(e.url).protocol; | ||
if (protocol === 'http:' || protocol === 'https:') { | ||
shell.openExternal(e.url); | ||
} | ||
}; | ||
|
||
const webview = document.getElementById('keep-webview'); | ||
const hideElements = () => { | ||
webview.insertCSS('.gb_7b{display:none!important}'); | ||
}; | ||
|
||
// Event Handlers | ||
webview.addEventListener('new-window', openLinkInNewWindow); | ||
webview.addEventListener('dom-ready', hideElements); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
extends: airbnb | ||
env: | ||
es6: true | ||
node: true | ||
mocha: true | ||
rules: | ||
arrow-spacing: error | ||
no-var: error | ||
strict: error | ||
prefer-const: error | ||
prefer-template: error | ||
template-curly-spacing: error | ||
func-names: | ||
- error | ||
- never | ||
ecmaFeatures: | ||
blockBindings: true | ||
|