Skip to content

Instantly share code, notes, and snippets.

@seriusokhatsky
Created October 26, 2018 09:44
Show Gist options
  • Save seriusokhatsky/4befa59188493195ddde628326e1ffc5 to your computer and use it in GitHub Desktop.
Save seriusokhatsky/4befa59188493195ddde628326e1ffc5 to your computer and use it in GitHub Desktop.
Gemini-reload-suite
// node_modules/gemini/lib/browser/new-browser.js
open(url, params) {
params = _.defaults(params || {}, {
resetZoom: false
});
// console.log(this._currentUrl);
if( this._currentUrl == url ) {
return params.resetZoom
? this._clientBridge.call('resetZoom').then(() => url)
: url;
} else {
this._currentUrl = url;
return this._wd.get(url)
.then((url) => {
return params.resetZoom
? this._clientBridge.call('resetZoom').then(() => url)
: url;
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment