viewport = device width for google.com

Very useful for those who use google.com with user agent of old browsers

// ==UserScript==
// @name        viewport = device width for google.com
// @namespace   http://example.com/viewport-for-google
// @match       https://www.google.com/search?*tbm=isch*
// @run-at      document-start
// @grant       none
// @version     0.1
// @author      Rishabh
// @description Very useful for those who use google.com with user agent of old browsers
// ==/UserScript==

(function() {
    'use strict';
    const tag = document.createElement('meta');
    tag.setAttribute("name", "viewport");
    tag.setAttribute("content", "width=device-width, initial-scale=1");

    function insertMetaTag() {
        if (!document.head.contains(tag)) {
            document.head.appendChild(tag);
        }
    }

    if (document.head) {
        insertMetaTag();
    } else {
        document.addEventListener("DOMContentLoaded", insertMetaTag);
    }
})();