Skip to content

Commit

Permalink
Show Chrome 85.0.4183.81 to Chrome Web Store
Browse files Browse the repository at this point in the history
  • Loading branch information
kiwibrowser authored Oct 10, 2020
1 parent 915d31d commit 0658d49
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0658d49

Please sign in to comment.