Skip to content

Commit

Permalink
Update elementCodes.js
Browse files Browse the repository at this point in the history
Now shows proper Operating System in UserAgent
  • Loading branch information
amanharwara committed Mar 27, 2019
1 parent 79eee5b commit ae7f28e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/windows/assets/js/elementCodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ function tabElement(tab) {
}

function instanceElement(tab) {
return `<div class="ui bottom attached tab segment" id="tab-content-${tab.id}" data-tab="${tab.id}">
/* return `<div class="ui bottom attached tab segment" id="tab-content-${tab.id}" data-tab="${tab.id}">
<webview preload="./js/whatsapp.js" id="whatsapp-${tab.id}" src="https://web.whatsapp.com/" useragent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36" partition="persist:${tab.id}"></webview>
</div>`; */
return `<div class="ui bottom attached tab segment" id="tab-content-${tab.id}" data-tab="${tab.id}">
<webview preload="./js/whatsapp.js" id="whatsapp-${tab.id}" src="https://web.whatsapp.com/" useragent="${window.navigator.userAgent.replace(/(altus|Electron)([^\s]+\s)/g, '')}" partition="persist:${tab.id}"></webview>
</div>`;
}

Expand Down

0 comments on commit ae7f28e

Please sign in to comment.