From 0658d497fc1c1fe39e5b8ee2bd8e5e82c05eca55 Mon Sep 17 00:00:00 2001 From: Kiwi Browser <40272275+kiwibrowser@users.noreply.github.com> Date: Sat, 10 Oct 2020 22:45:38 +0300 Subject: [PATCH] Show Chrome 85.0.4183.81 to Chrome Web Store --- .../src/org/chromium/chrome/browser/PersonalizeResults.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/android/java/src/org/chromium/chrome/browser/PersonalizeResults.java b/chrome/android/java/src/org/chromium/chrome/browser/PersonalizeResults.java index 4257ceb5faf..81fd878ee64 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/PersonalizeResults.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/PersonalizeResults.java @@ -27,7 +27,7 @@ public static void Execute(Tab tab) { tab.getWebContents().evaluateJavaScript("(function() { var pendingUpdate=false;function viewportHandler(event){if(pendingUpdate)return;pendingUpdate=true;requestAnimationFrame(()=>{pendingUpdate=false;document.getElementsByTagName('html')[0].style.maxWidth=window.visualViewport.width+'px';var miniLeft=visualViewport.offsetLeft;var miniTop = -(visualViewport.offsetTop + visualViewport.offsetTop * ((window.pageYOffset / window.innerHeight) / 2));document.getElementsByTagName('html')[0].style.transition='0s ease-in-out';if (miniLeft == 0 && miniTop == 0) { document.getElementsByTagName('html')[0].style.transform=''; } else { document.getElementsByTagName('html')[0].style.transform='translate('+miniLeft+'px, '+miniTop+'px) scale(1.0)'; } })}window.visualViewport.addEventListener('resize',viewportHandler);window.visualViewport.addEventListener('scroll', viewportHandler); })();", null); } if (tab != null && tab.getUrl().startsWith("https://chrome.google.com/webstore")) { - tab.getWebContents().evaluateJavaScript("(function() { function createProperty(value){var _value=value;function _get(){return _value}function _set(v){_value=v}return{'get':_get,'set':_set}};function makePropertyWritable(objBase,objScopeName,propName,initValue){var newProp,initObj;if(objBase&&objScopeName in objBase&&propName in objBase[objScopeName]){if(typeof initValue==='undefined'){initValue=objBase[objScopeName][propName]}newProp=createProperty(initValue);try{Object.defineProperty(objBase[objScopeName],propName,newProp)}catch(e){initObj={};initObj[propName]=newProp;try{objBase[objScopeName]=Object.create(objBase[objScopeName],initObj)}catch(e){}}}}; makePropertyWritable(window, 'navigator', 'userAgent'); window.navigator.userAgent='Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.90 Safari/537.36'; window.addEventListener('load', function() { var node = document.createElement('style'); document.body.appendChild(node); window.addStyleString = function(str) { node.innerHTML = str; }; addStyleString('div { visibility: visible !important; } '); var t=document.querySelector('meta[name=\"viewport\"]');t&&(t.content=\"initial-scale=0.1\",t.content=\"width=1200\") }); })();", null); + tab.getWebContents().evaluateJavaScript("(function() { function createProperty(value){var _value=value;function _get(){return _value}function _set(v){_value=v}return{'get':_get,'set':_set}};function makePropertyWritable(objBase,objScopeName,propName,initValue){var newProp,initObj;if(objBase&&objScopeName in objBase&&propName in objBase[objScopeName]){if(typeof initValue==='undefined'){initValue=objBase[objScopeName][propName]}newProp=createProperty(initValue);try{Object.defineProperty(objBase[objScopeName],propName,newProp)}catch(e){initObj={};initObj[propName]=newProp;try{objBase[objScopeName]=Object.create(objBase[objScopeName],initObj)}catch(e){}}}}; makePropertyWritable(window, 'navigator', 'userAgent'); window.navigator.userAgent='Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.81 Safari/537.36'; window.addEventListener('load', function() { var node = document.createElement('style'); document.body.appendChild(node); window.addStyleString = function(str) { node.innerHTML = str; }; addStyleString('div { visibility: visible !important; } '); var t=document.querySelector('meta[name=\"viewport\"]');t&&(t.content=\"initial-scale=0.1\",t.content=\"width=1200\") }); })();", null); } if (tab != null && tab.getUrl().startsWith("https://microsoftedge.microsoft.com/addons")) { tab.getWebContents().evaluateJavaScript("(function() { function createProperty(value){var _value=value;function _get(){return _value}function _set(v){_value=v}return{'get':_get,'set':_set}};function makePropertyWritable(objBase,objScopeName,propName,initValue){var newProp,initObj;if(objBase&&objScopeName in objBase&&propName in objBase[objScopeName]){if(typeof initValue==='undefined'){initValue=objBase[objScopeName][propName]}newProp=createProperty(initValue);try{Object.defineProperty(objBase[objScopeName],propName,newProp)}catch(e){initObj={};initObj[propName]=newProp;try{objBase[objScopeName]=Object.create(objBase[objScopeName],initObj)}catch(e){}}}}; makePropertyWritable(window, 'navigator', 'userAgent'); window.navigator.userAgent=window.navigator.userAgent + ' Edg/0.0'; window.addEventListener('load', function() { var xpath = function(xpathToExecute){ var result = []; var nodesSnapshot = document.evaluate(xpathToExecute, document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); for (var i=0 ; i < nodesSnapshot.snapshotLength; i++) { result.push(nodesSnapshot.snapshotItem(i)); } return result; }; xpath(\"//button[contains(@id,'getOrRemoveButton')]\").forEach(function (individualButton) { individualButton.style.opacity='1'; individualButton.style.background='rgb(0, 120, 212) !important'; individualButton.removeAttribute('disabled'); individualButton.onclick = function () { var addonId = this.id.split('-')[1]; window.open('https://edge.microsoft.com/extensionwebstorebase/v1/crx?response=redirect&acceptformat=crx3&x=id%3D' + addonId + '%26installsource%3Dondemand%26uc', '_blank'); } }); }); })();", null);