Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions contentscript.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// see https://stackoverflow.com/questions/23202136/changing-navigator-useragent-using-chrome-extension
var actualCode = '(' + function() {
// Get the correct platform for navigator.userAgent
var candidates = ["Android", "iPhone", "iPod", "iPad"];
var candidates = ["Android", "iPhone", "iPod", "iPad", "Win"];
var modifiedPlatform;
for(var maybe of candidates) {
if(navigator.userAgent.match(maybe)) {
Expand All @@ -24,5 +24,5 @@ var actualCode = '(' + function() {
// Inject custom js
var s = document.createElement('script');
s.textContent = actualCode;
document.documentElement.appendChild(s);
s.remove();
document.documentElement.insertBefore(s, document.documentElement.firstChild)
s.remove();