{"id":235,"date":"2009-11-10T18:04:13","date_gmt":"2009-11-10T18:04:13","guid":{"rendered":"https:\/\/kari.world.ikari.fi\/2009\/11\/10\/opera-fullscreen-mode\/"},"modified":"2009-11-10T18:04:13","modified_gmt":"2009-11-10T18:04:13","slug":"opera-fullscreen-mode","status":"publish","type":"post","link":"https:\/\/kari.world.ikari.fi\/?p=235","title":{"rendered":"Opera Fullscreen mode"},"content":{"rendered":"<p>Shortly said, opera is interpreting &#8221;full screen&#8221; mode to be media type &#8217;projection&#8217;, which causes that plenty of badly made web sites render badly when turning on full screen rendering in Opera. Sadly, it&#8217;s impossible to ask every web site to patch their site, it&#8217;s time to turn into local fix:<\/p>\n<p>1) Turn on user java scripts in opera<br \/>\n[code]<br \/>\nmkdir ~\/user_js<\/p>\n<p>Select: Tools &#8211; Preferences:<br \/>\n&#8211; &#8221;Content&#8221;<br \/>\n&#8211; &#8221;JavaScript Options&#8221;<br \/>\n&#8211; &#8221;User JavaScript files&#8221;<br \/>\n   * select directory you just created<\/p>\n<p>kwrite ~\/user_js\/projection.js<br \/>\n[\/code]<\/p>\n<p>2) Paste following content into projection.js you just started editing.<\/p>\n<p>[code lang=&#8221;javascript&#8221;]<br \/>\ndocument.addEventListener(<br \/>\n  &#8217;load&#8217;,<br \/>\n  function() {<br \/>\n    var l=document.getElementsByTagName(&#8217;link&#8217;);<br \/>\n    var s=document.getElementsByTagName(&#8217;style&#8217;);<br \/>\n    var MEDIA=&#8217;media&#8217;;<br \/>\n    var PROJECT=&#8217;projection&#8217;;<br \/>\n    var SCREEN=&#8217;screen&#8217;;<br \/>\n    var REL=&#8217;rel&#8217;;<\/p>\n<p>    for (var i=0; i<s.length; i++) {\n      var elem=s[i];\n\n      if (elem.hasAttribute(MEDIA)) {\n        if (elem.getAttribute(MEDIA).indexOf(SCREEN)>-1 &#038;&#038; elem.getAttribute(MEDIA).indexOf(PROJECT)==-1) {<br \/>\n          elem.setAttribute(MEDIA,elem.getAttribute(MEDIA)+&#8217;,projection&#8217;);<br \/>\n        }<br \/>\n        if (elem.getAttribute(MEDIA).indexOf(PROJECT)>-1 &#038;&#038; elem.getAttribute(MEDIA).indexOf(SCREEN)==-1) {<br \/>\n          elem.setAttribute(MEDIA,elem.getAttribute(MEDIA).replace(PROJECT,&#8217;OperaShow&#8217;));<br \/>\n        }<br \/>\n      }<br \/>\n    }<\/p>\n<p>    for (i=0; i<l.length; i++) {\n      var elem=l[i];\n      if (elem.hasAttribute(REL) &#038;&#038; elem.hasAttribute(MEDIA)){\n        if (elem.getAttribute(REL)=='stylesheet'\n             &#038;&#038; elem.getAttribute(MEDIA).indexOf(SCREEN)>-1<br \/>\n             &#038;&#038; elem.getAttribute(MEDIA).indexOf(PROJECT)==-1) {<br \/>\n          elem.setAttribute(MEDIA,elem.getAttribute(MEDIA)+&#8217;,projection&#8217;);<br \/>\n        }<br \/>\n        if (elem.getAttribute(REL)==&#8217;stylesheet&#8217;<br \/>\n             &#038;&#038; elem.getAttribute(MEDIA).indexOf(PROJECT)>-1<br \/>\n             &#038;&#038; elem.getAttribute(MEDIA).indexOf(SCREEN)==-1) {<br \/>\n          elem.setAttribute(MEDIA,elem.getAttribute(MEDIA).replace(PROJECT,&#8217;OperaShow&#8217;));<br \/>\n        }<br \/>\n      }<br \/>\n    }<br \/>\n  },<br \/>\n  false<br \/>\n);<br \/>\n[\/code]<\/p>\n<p>3) Reload site having problems in full screen. Restart of opera is <strong>not<\/strong> needed.<\/p>\n<p>4) If you&#8217;ve any problems, check &#8221;Tools &#8211; Advanced &#8211; Error Console&#8221; contents.<\/p>\n<p>For completeness, script is taken (and fixed) from: <a href=\"http:\/\/my.opera.com\/scipio\/blog\/show.dml\/15829\">UserJS: Disable OperaShow<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Shortly said, opera is interpreting &#8221;full screen&#8221; mode to be media type &#8217;projection&#8217;, which causes that plenty of badly made web sites render badly when turning on full screen rendering in Opera. Sadly, it&#8217;s impossible to ask every web site to patch their site, it&#8217;s time to turn into local fix: 1) Turn on user&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,14],"tags":[],"class_list":["post-235","post","type-post","status-publish","format-standard","hentry","category-misc","category-reference"],"_links":{"self":[{"href":"https:\/\/kari.world.ikari.fi\/index.php?rest_route=\/wp\/v2\/posts\/235","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kari.world.ikari.fi\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kari.world.ikari.fi\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kari.world.ikari.fi\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kari.world.ikari.fi\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=235"}],"version-history":[{"count":0,"href":"https:\/\/kari.world.ikari.fi\/index.php?rest_route=\/wp\/v2\/posts\/235\/revisions"}],"wp:attachment":[{"href":"https:\/\/kari.world.ikari.fi\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=235"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kari.world.ikari.fi\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=235"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kari.world.ikari.fi\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=235"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}