joelpt / sidewise

Persistent sidebar extension for Chrome featuring tree style tabs and tab hibernation.
Creative Commons Zero v1.0 Universal
68 stars 13 forks source link

'Mobile browser' sidebar pane #25

Open joelpt opened 12 years ago

joelpt commented 12 years ago
joelpt commented 12 years ago

It is probably not possible to defeat X-Frame-Options settings to permit any page to load into the sidebar's IFRAMEs. A few things can still be tried however:

http://code.google.com/chrome/extensions/trunk/webRequest.html
additional options to try in webReq.onBeforeSendHeaders (also try in .onBeforeRequest?):

// Specify domains from which requests are allowed
header('Access-Control-Allow-Origin: *');

// Specify which request methods are allowed
header('Access-Control-Allow-Methods: GET, POST, OPTIONS');

possibly hook onHeadersReceived and modify the headers received before the browser interprets them <?>

Failing that, the only probable solution is to actually load the desired page at the top level within the sidebar, then use content script to inject the sidebar's top navigation bar into said page, shift the page's content down (hopefully by setting margin-top: 30px on so that absolutely positioned elements in the target page offset properly) and also inject onResize() a handler.