// ==UserScript==
// @name Add Drive before more
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Adds Drive link to YouTube header menu
// @author harry
// @match https://vanced-youtube.neocities.org/2011/
// @grant none
// @license MIT
// @downloadURL none
// ==/UserScript==
(function() {
'use strict';
// Create the new
element for Drive
var driveNode = document.createElement('li');
driveNode.className = 'gbt';
driveNode.innerHTML = 'Drive';
// Find the target element
var targetNode = document.querySelector('li.gbt a.gbzt#gbztm[href="http://www.google.com/intl/en/options/"]');
// Insert the Drive node before the target node
if (targetNode) {
var parent = targetNode.parentNode.parentNode;
parent.insertBefore(driveNode, targetNode.parentNode);
}
})();