Active Topics

 


Reply
Thread Tools
Shanezlar's Avatar
Posts: 38 | Thanked: 67 times | Joined on Oct 2009 @ Allemagne
#11
I just found a way to do something close to what you are asking, albeit just for the page you are currently viewing (not as a browser setting).

type the following in your address bar:
Code:
javascript:var d=(document.body.style.minWidth="1050px");
Replace 1050 with the width you want. Tested only on talk.maemo.org
You can also create a bookmark with the above code as URI (address) and use it as a shortcut.

Together with browser-plugins such as Greasemonkey you can probably have a general solution (i.e. apply this to all pages of a certain domain), but I haven't tried it yet.
Attached Images
 

Last edited by Shanezlar; 2010-04-12 at 21:23. Reason: 1050px
 

The Following 10 Users Say Thank You to Shanezlar For This Useful Post:
Posts: 1,427 | Thanked: 2,077 times | Joined on Aug 2009 @ Sydney
#12
wow. that actually works exactly how I want it. 1050 width renders TMO actually 100% perfectly it seems. also, it makes the browser much more useable in many sites. Noticed that the setting disappears soon as I go to a different link/site however. doh.

is there greasemonkey plugin for maemo5 MicroB?
 
Shanezlar's Avatar
Posts: 38 | Thanked: 67 times | Joined on Oct 2009 @ Allemagne
#13
Originally Posted by jakiman View Post
Noticed that the setting disappears soon as I go to a different link/site however.
That is because it is not a setting but rather a change to the CSS (style/appearance) of the currently displayed page.
TMO could actually put that in their CSS-file and have it work for all users automatically (but there might be undesirable side effects - such as portrait mode being unusable - and some users might like this style less).

is there greasemonkey plugin for maemo5 MicroB?
I've seen it in extras-testing (usual warnings apply)

Last edited by Shanezlar; 2010-04-12 at 21:50.
 

The Following 2 Users Say Thank You to Shanezlar For This Useful Post:
Posts: 1,427 | Thanked: 2,077 times | Joined on Aug 2009 @ Sydney
#14
Hmm. Tried installing greasemonkey from HAM but it doesn't show up in the add-ons in MicroB. Tried uninstall / reinstall a few times but still same. Hmm.
 
Shanezlar's Avatar
Posts: 38 | Thanked: 67 times | Joined on Oct 2009 @ Allemagne
#15
Originally Posted by jakiman View Post
Hmm. Tried installing greasemonkey from HAM but it doesn't show up in the add-ons in MicroB. Tried uninstall / reinstall a few times but still same. Hmm.
Current greasemonkey in testing seems to be missing a link.
Running the following in xterm fixed it for me:
Originally Posted by Shanezlar View Post
ln -s /usr/lib/browser/extensions/{e4a8a97b-f2ed-450b-b12d-ee082ba24781} ~/.mozilla/microb/extensions/{e4a8a97b-f2ed-450b-b12d-ee082ba24781}
(need to restart microB afterwards, e.g. by closing all of its windows)

I made a very basic greasemonkey script, that sets the minimum width on talk.maemo.org to 1050 pixels.
Don't have a webspace to host the script, so I'll just post the code here
Code:
// Increase body minimum width script for talk.maemo.org
//
// --------------------------------------------------------------------
//
// ==UserScript==
// @name          Body width extender
// @namespace     body_width_extender
// @description   extends the minimum body width on talk.maemo.org to 1050 pixels
// @include       http://talk.maemo.org/*
// ==/UserScript==


document.body.style.minWidth="1050px";
Save this into 'body_width_extender.user.js' somwhere on your N900 and open it with microB (e.g. 'file:///home/users/MyDocs/body_width_extender.user.js'). Confirm the dialog and the script will be installed. Now tmo should increase it's width to 1050 pixels after fully loading.

To add more sites to be affected by the script or to uninstall it access 'chrome://greasemonkey/content/manage.xul‎' in microB.

A more complex script that uses configurable widths for particular sites would not be too hard write either (writing a nice UI for this would take some time however).

Last edited by Shanezlar; 2010-04-12 at 23:41.
 

The Following 5 Users Say Thank You to Shanezlar For This Useful Post:
Ronaldo's Avatar
Posts: 682 | Thanked: 208 times | Joined on Jan 2010 @ UK
#16
i just installed it without any issues. thanks
__________________
n900 (UK) Global 3.2010.02.8
 
Shanezlar's Avatar
Posts: 38 | Thanked: 67 times | Joined on Oct 2009 @ Allemagne
#17
My previous script made the site hard to read in portrait mode (one handed use), so I wrote a gm-script that is aware of the current orientation.

Furthermore you can now specify some variables in 'about:config' (read the warning there) under greasemonkey.scriptvals.body_width_extender. They are:
-"minWidth": desired minimum width in pixels for the pages where this script is active (default: 1050)
-"applyInLandscapeMode": whether it should be applied while in landscape mode (default: true)
-"applyInPortraitMode": same as above for portrait mode (default: false)

For those interested:
Code:
// Minimum body width extender
// greasemonkey script
// ----------------------------------------------------------------
//
// ==UserScript==
// @name          Body width extender
// @namespace     body_width_extender
// @description   extends the minimum body width on talk.maemo.org to 1050 pixels
// @include       http://talk.maemo.org/*
// ==/UserScript==


var originalMinWidth = document.body.style.minWidth;
var desiredMinWidth = GM_getValue("minWidth",-1);

if(desiredMinWidth == -1)
{
	GM_setValue("minWidth","1050");
        desiredMinWidth = 1050;

        GM_setValue("applyInLandscapeMode", true);
	GM_setValue("applyInPortraitMode", false);
}

checkMinWidthForCurrentWindow();
window.addEventListener('resize', checkMinWidthForCurrentWindow, false);

function checkMinWidthForCurrentWindow()
{
	if((isInLandscape() && GM_getValue("applyInLandscapeMode")) || (!isInLandscape() && GM_getValue("applyInPortraitMode"))) 
	{
		document.body.style.minWidth=desiredMinWidth+"px";
	}
	else
	{
		document.body.style.minWidth=originalMinWidth;
	}
}

function isInLandscape()
{
  if(screen.width==480) return false
  else return true;
}
 

The Following 6 Users Say Thank You to Shanezlar For This Useful Post:
Posts: 235 | Thanked: 89 times | Joined on Oct 2009 @ italy
#18
Hi guys, sorry for my ignorance. Why happens it?
Why microb browser literally cut part of some webpages?
I don't understand.
Thank you for explanation...
__________________
If you found my post useful please thank me, I appreciate!
 
Changegames's Avatar
Posts: 277 | Thanked: 69 times | Joined on Jul 2010
#19
Originally Posted by Shanezlar View Post
My previous script made the site hard to read in portrait mode (one handed use), so I wrote a gm-script that is aware of the current orientation.

Furthermore you can now specify some variables in 'about:config' (read the warning there) under greasemonkey.scriptvals.body_width_extender. They are:
-"minWidth": desired minimum width in pixels for the pages where this script is active (default: 1050)
-"applyInLandscapeMode": whether it should be applied while in landscape mode (default: true)
-"applyInPortraitMode": same as above for portrait mode (default: false)

For those interested:
Code:
// Minimum body width extender
// greasemonkey script
// ----------------------------------------------------------------
//
// ==UserScript==
// @name          Body width extender
// @namespace     body_width_extender
// @description   extends the minimum body width on talk.maemo.org to 1050 pixels
// @include       http://talk.maemo.org/*
// ==/UserScript==


var originalMinWidth = document.body.style.minWidth;
var desiredMinWidth = GM_getValue("minWidth",-1);

if(desiredMinWidth == -1)
{
	GM_setValue("minWidth","1050");
        desiredMinWidth = 1050;

        GM_setValue("applyInLandscapeMode", true);
	GM_setValue("applyInPortraitMode", false);
}

checkMinWidthForCurrentWindow();
window.addEventListener('resize', checkMinWidthForCurrentWindow, false);

function checkMinWidthForCurrentWindow()
{
	if((isInLandscape() && GM_getValue("applyInLandscapeMode")) || (!isInLandscape() && GM_getValue("applyInPortraitMode"))) 
	{
		document.body.style.minWidth=desiredMinWidth+"px";
	}
	else
	{
		document.body.style.minWidth=originalMinWidth;
	}
}

function isInLandscape()
{
  if(screen.width==480) return false
  else return true;
}
sorry for reviving this thread but i need help ive used this script but how can i exclude websites? the add button dont work on preferences and the only one i can edit on included website is http://talk.maemo.org/*

ive also tried editing the js file but still didnt work.
 
Reply

Tags
greasemonkey, question, web browser resolution, wider, width


 
Forum Jump


All times are GMT. The time now is 15:40.