Author

Topic: Bitcoin Monitor - Full Screen (Read 1637 times)

legendary
Activity: 1078
Merit: 1000
Charlie 'Van Bitcoin' Shrem
July 16, 2011, 01:55:12 PM
#8
site not found
legendary
Activity: 1008
Merit: 1021
Democracy is the original 51% attack
July 16, 2011, 01:38:51 PM
#7
Getting "Site not found" error
full member
Activity: 154
Merit: 100
July 16, 2011, 12:38:09 PM
#6

I was just playing with Bitcoin Monitor via Chrome's document inspector, deleting out width constraints, etc to make it display it 2500px wide.

Would be nice if there was an easier way to stretch it in the browser window.

I use Opera. Just drag the slider in the bottom right to get up to 5x zoom of the whole window. Works a treat with Bitcoin Monitor (I just did it).

Thanks, but that's a whole different thing Smiley

That's like spending huge $ on a 30" monitor just so that your icons look bigger.

I prefer to use the extra space for more information, and keep my icons microscopic.
full member
Activity: 140
Merit: 100
July 16, 2011, 12:33:24 PM
#5

I was just playing with Bitcoin Monitor via Chrome's document inspector, deleting out width constraints, etc to make it display it 2500px wide.

Would be nice if there was an easier way to stretch it in the browser window.

I use Opera. Just drag the slider in the bottom right to get up to 5x zoom of the whole window. Works a treat with Bitcoin Monitor (I just did it).
full member
Activity: 154
Merit: 100
July 16, 2011, 12:29:16 PM
#4
I was bored, so I made a very simple UserScript to throw bitcoin monitor into full screen.
If you care to try it, I've thrown it up at my google page.

http://j.mp/altpluzf4

404


I was just playing with Bitcoin Monitor via Chrome's document inspector, deleting out width constraints, etc to make it display it 2500px wide.

Would be nice if there was an easier way to stretch it in the browser window.
newbie
Activity: 41
Merit: 0
June 01, 2011, 06:54:47 AM
#3
Very nifty!

I've gone through the code, looks clean. Thanks for this! Cheesy

Thanks.

Yeah, it's clean... but uh, sort of "weak." I made it for personal usage out of boredom.

Anyway, to save anyone time, here's the source of it... I'm sure anyone could greatly improve it.

Code:
// ==UserScript==
// @name           Bitcoin Monitor Full Screen
// @namespace      none
// @description    Adds a full screen button to bottom right corner.
// @include        http://bitcoinmonitor.com/
// @include        http://bitcoinmonitor.com/#
// @include        http://www.bitcoinmonitor.com/
// @include        http://www.bitcoinmonitor.com/#
// ==/UserScript==

var bFS = false;
var scale = 0.95;

var container = document.getElementById('content');
var graph = document.getElementById('placeholder');
var slider = document.getElementById('slider_box');
var elems = document.getElementsByTagName('*');
var toggleBtn = document.createElement('a');

var defaults = Array();
var bDefaultsSet = false;

function showExcess(bShow) {
    var disp = bShow ? '' : 'none';
   
    for (var i = 0; i < elems.length; i++) {
        var e = elems[i];
        if (e.tagName == 'HEADER' || e.tagName == 'FOOTER') {
            e.style.display = disp;
        }
        if (e.hasAttribute('class')) {
            var cls = e.getAttribute('class');
            if (cls.indexOf('wrapper') != -1 || cls.indexOf('body3') != -1) {
                e.style.display = disp;
            }
        }
    }
}

function doResize() {
    if (bFS) {
        var scaleWidth = window.innerWidth * scale;
        var scaleHeight = window.innerHeight * scale;
        container.style.width = parseInt(scaleWidth) + 'px';
        container.style.height = parseInt(scaleHeight) + 'px';
        container.style.left = parseInt((window.innerWidth / 2) - (scaleWidth / 2)) + 'px';
        container.style.top = parseInt((window.innerHeight / 2) - (scaleHeight / 2)) + 'px';
    }
    unsafeWindow.refresh_viewport();
}

function toggleFS() {
    if (!bDefaultsSet) {
        defaults['gw'] = graph.style.width;
        defaults['gh'] = graph.style.height;
        defaults['cw'] = container.style.width;
        defaults['ch'] = container.style.height;
        defaults['ct'] = container.style.top;
        defaults['cl'] = container.style.left;
        defaults['cp'] = container.style.position;
        defaults['bg'] = document.body.style.background;
        bDefaultsSet = true;
    }
   
    showExcess(bFS);
    bFS = !bFS;
    if (bFS) {
        toggleBtn.textContent = 'Full Screen [on ]';
        document.body.style.background = '#FFFFFF';
        container.style.position = 'fixed';
        container.style.top = '0px';
        container.style.left = '0px';
        graph.style.width = '100%';
        graph.style.height = '100%';
        window.addEventListener('resize', doResize, false);
    } else {
        window.removeEventListener('resize', doResize, false);
        document.body.style.background = defaults['bg'];
        container.style.position = defaults['cp'];
        container.style.top = defaults['ct'];
        container.style.left = defaults['cl'];
        container.style.width = defaults['cw'];
        container.style.height = defaults['ch'];
        graph.style.width = defaults['gw'];
        graph.style.height = defaults['gh'];
        toggleBtn.textContent = 'Full Screen [off]';
    }
    doResize();
}

toggleBtn.href = '#';
toggleBtn.textContent = 'Full Screen [off]';
toggleBtn.style.position = 'fixed';
toggleBtn.style.bottom = '0px';
toggleBtn.style.right = '0px';
toggleBtn.style.zIndex = 9;
toggleBtn.style.fontFamily = 'monospace';
document.body.insertBefore(toggleBtn, document.body.lastChild);
toggleBtn.addEventListener('click', toggleFS, false);

I don't expect it to be used much, but I figured it would be better to share just in case someone wants to use it :-/

Thanks for your time, and for your comment Beremat.
full member
Activity: 263
Merit: 100
YGOLD is a Defi platform
May 31, 2011, 11:31:27 PM
#2
Very nifty!

I've gone through the code, looks clean. Thanks for this! Cheesy
newbie
Activity: 41
Merit: 0
May 31, 2011, 06:45:25 PM
#1
I was bored, so I made a very simple UserScript to throw bitcoin monitor into full screen.
If you care to try it, I've thrown it up at my google page.

http://j.mp/altpluzf4

It just adds a link to the bottom right corner of the page to toggle on/off.
I personally use this when I want more "detail" in a large cluster of transactions.

Any opinions, thoughts, suggestions, etc are welcome.
Thanks for your time.
Jump to: