User:HueSatLum/googleTitle.js

$(function{ if([0, 1].indexOf(mw.config.get('wgNamespaceNumber')) > -1){    importStylesheet('User:HueSatLum/googleTitle.css');    var title = mw.config.get('wgTitle'),        searchTitle = title.toLowerCase.replace(/\((.+?)\)$/, '$1'),        searchURL = 'https://www.google.com/search?q=-site:wikipedia.org%20' + encodeURIComponent(searchTitle),        linkElem = $('', { 'class': 'external', 'href': searchURL, 'id': 'googleTitle', 'target': '_blank', 'text': 'G', 'title': 'Search Google for the article title' });   $('#firstHeading').prepend(linkElem, '\n');  } });