Remove Stackoverflow Sidebar

Remove the sidebar and stretch the main content so that it fills the whole width, better when you have a browser window open next to your code and it's too narrow to see much with all the wasted space.

  1. // ==UserScript==
  2. // @name Remove Stackoverflow Sidebar
  3. // @description Remove the sidebar and stretch the main content so that it fills the whole width, better when you have a browser window open next to your code and it's too narrow to see much with all the wasted space.
  4. // @version 1
  5. // @grant none
  6. // @include http*://stackoverflow.com/questions/*
  7. // @include http*://serverfault.com/questions/*
  8. // @include http*://superuser.com/questions/*
  9. // @include http*://stackapps.com/questions/*
  10. // @include http*://meta.stackoverflow.com/questions/*
  11. // @include http*://*.stackexchange.com/questions/*
  12. // @include http*://askubuntu.com/questions/*
  13. // @include http*://answers.onstartups.com/questions/*
  14. // @include http*://meta.mathoverflow.net/questions/*
  15. // @include http*://mathoverflow.net/questions/*
  16. // @namespace https://greatest.deepsurf.us/users/293891
  17. // ==/UserScript==
  18.  
  19. (function(d){
  20. var esidebar = d.getElementById('sidebar');
  21. var emainbar = d.getElementById('mainbar');
  22.  
  23. esidebar.parentNode.removeChild(esidebar);
  24. emainbar.style.width = "100%"
  25. })(document);