jquery - How to disable same origin policy for chrome new tab? -
i'd user-script increase zoom size of tiles in default chrome new tab. used able access them directly (in last year or so) they've changed new tab use iframe tiles. never got around fixing it, until trying again.
so can't change more — code jq('#mv-single').contents().find('.mv-tile').css("zoom", 1.4);
no results, , using jquery @ console shows me reason:
jq('#mv-single').contents().find("body") vm8405:8 uncaught domexception: failed read 'contentdocument' property 'htmliframeelement': blocked frame origin "https://www.google.com" accessing cross-origin frame.(…)
the iframe is:
<iframe id="mv-single" src="chrome-search://most-visited/single.html?removetooltip=no%20mostrar%20en%20esta%20p%c3%a1gina"></iframe>
a bad alternative i'm not interested in disabling web security. don't want permanently , globally turn off web security, seems bad idea (and mentioned general solution developers debugging code). turning off page great. :)
an alternative write custom new tab page, doesn't entirely easy me. there things new tab page — google account bar @ top, trending pages recent history in tiles.. part don't need search bar in middle.
it better if change css still. ideas?
here current script (with recent css changes elements view in console in comments):
// ==userscript== // @name chrome newtab // @namespace http://your.homepage/ // @version 1.0 // @description css reformatting // @author // @include /https?://www.google.com/_/chrome/newtab/ // @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js // @grant none // ==/userscript== window.jq=jquery.noconflict(true); jq(document).ready(function(){ jq('#mv-single').load(function(){ jq('#mv-single').contents().find('.mv-tile').css("zoom", 1.4); // #mv-single { // width: 80vw; // margin-left: 10vw; // margin-right: 10vw; // height: 35vw; // } // #mv-single body { zoom: 165% } }); });
Comments
Post a Comment