rainer.adelstonegmail.com / Maximize Space for Netvibes Feeds

// ==UserScript==
// @name        Maximize Space for Netvibes Feeds
// @namespace   netvibes
// @description Reader experience enhancement
// @match       http://www.netvibes.com/dashboard/*
// @match       https://www.netvibes.com/dashboard/*
// @grant       none
// @version     1.7
// @license     MIT
// ==/UserScript==

var iframe_el_offset = 147;
var is_adjusting, article_list, resize_flag;

(function enhanceReadingExperience() {
  var articles_list = document.getElementsByClassName('nv-line-item-renderer'); // Articles list
  if (articles_list && articles_list.length === 0) {
    setTimeout(enhanceReadingExperience, 200);
  }
  else if (articles_list && articles_list.length > 0) {
    for (var i = 0; i < articles_list.length; i++) {
      if (articles_list[i].className.indexOf('listened') === -1) {
        articles_list[i].className += ' listened';
        articles_list[i].addEventListener('click', maximizeIframe, false);
      }
    }
    var articles_container = document.getElementsByClassName('no-native-scrollbars')[2]; // Articles container
    articles_container.onscroll = function () {
      checkOffset(enhanceReadingExperience);
    };
    var feeds_container = document.getElementsByClassName('nv-treeview-streams'); // Feeds container
    feeds_container[0].addEventListener('click', function () {
      setTimeout(enhanceReadingExperience, 200);
    }, false);
    article_list = document.getElementById('smartreader-feeds-main');
    if (!resize_flag) {
      resize_flag = true;
      window.addEventListener('resize', function () {
        article_list.style.width = 'auto';
      });
    }
  }
})();

function checkOffset(callback) {
  if (!is_adjusting) {
    var iframe_el = document.getElementsByTagName('IFRAME')[0];
    if (iframe_el && iframe_el.outerHTML !== "" && (iframe_el.style.visibility !== "hidden")) {
      if (iframe_el_offset !== Math.floor(Number(iframe_el.getBoundingClientRect().top))) {
        adjustOffset();
      }
    }
    else {
      if (callback && typeof callback === 'function') setTimeout(callback(), 200);
    }
  }
}

function maximizeIframe() {
  var iframe_el = document.getElementsByTagName('IFRAME')[0];
  if (iframe_el && iframe_el.outerHTML !== "" && (iframe_el.style.visibility !== "hidden")) {
    iframe_el.style.width = '81vw';
    iframe_el.style.marginLeft = '-5vw';
    var headline = document.getElementsByClassName('nv-item-renderer-content-wrapper')[0];
    headline.style.display = 'none';
  }
  var item_headers = document.getElementsByClassName('item-header');
  for (var i = 0; i < item_headers.length; i++) {
    if (item_headers[i].innerHTML === "") {
      item_headers[i].style.display = 'none';
      break;
    }
  }
}

function adjustOffset() {
  is_adjusting = true;
  setTimeout(function () {
    var article_list_width = article_list.offsetWidth;
    article_list.style.width = String(article_list_width - 1) + "px";
    setTimeout(function () {
      article_list.style.width = String(article_list_width) + "px";
      is_adjusting = false;
      checkOffset();
    }, 500);
  }, 500);
}