0%

Centering Google Search and Google Scholar

Google’s search results are left aligned by default, which becomes a pain point when browsing with wide screens. After looking around for a while, I was finally able to center the webpage of google.com or scholar.google.com using the attached TamperMonkey scripts.

Before After
image-20200711114949742 image-20200711115005556
image-20200711115203450 image-20200711115126206

Centering Google Scholar:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// ==UserScript==
// @name Google Scholar Centering
// @namespace http://tampermonkey.net/
// @version 1.3
// @description Center the Google Scholar search results.
// @author GDUFXRT
// @match https://scholar.google.com/*
// @run-at document-start
// @grant none
// ==/UserScript==

(function() {
'use strict';
var style = document.createElement('style');
var cssStyle = '#gs_res_ccl {margin: auto !important;} html, body, p, a {font-family: Calibri !important;}';

style.innerText = cssStyle;
document.querySelector('head').appendChild(style);
})();

Centering Google Search (credit to: @yoyoso):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// ==UserScript==
// @name Google Search Centering
// @namespace http://tampermonkey.net/
// @version 1.3
// @description Center the Google search results.
// @author GDUFXRT
// @match https://www.google.com/search*
// @run-at document-start
// @grant none
// ==/UserScript==

(function() {
'use strict';
var style = document.createElement('style');
var cssStyle = '.mw {margin: auto !important;} html, body, p, a {font-family: Calibri !important;}';
style.innerText = cssStyle;
document.querySelector('head').appendChild(style);
})();