Source for "Google Silver Wing"

By Snake Arsenic
Has 13 other scripts.


// ==UserScript==
// @name           Google Silver Wing
// @namespace      google_silverwing@snakehole.net
// @include        *.google.*
// @description    Adds Silver Wing logos to Google. Version 1.0b.
// ==/UserScript==
function swap(){
if (location.host.match(/google/)){
// Exclusions come first.
if (document.title.match(/Gmail: /) ||
document.title.match(/Google Accounts/)){
}else if (document.title.match(/Google/)){
for (i=0; i<document.images.length; i++) { // loop through images
if (document.images[i].src.match(/images\/logo.gif/)){
document.images[i].src='http://209.85.62.24/85/152/0/p31805/swgdm6.png'; // replace with Silver Wing Logo
}
}
}

if (document.title.match(/Google Image/)){
for (i=0; i<document.images.length; i++) { // loop through images
if (document.images[i].alt=='Google'){
document.images[i].src='http://209.85.62.24/85/152/0/p31789/images_hp.gif'; // replace with Silver Wing Logo
}
}
}

if (document.title.match(/Google Maps/)){
for (i=0; i<document.images.length; i++) { // loop through images
if (document.images[i].src.match(/maps_logo_small.png/)){
document.images[i].src='http://209.85.62.24/85/152/0/p31793/maps_results_logo.gif'; // replace with Silver Wing Logo
}
}
}

if (document.title.match(/Google News/)){
for (i=0; i<document.images.length; i++) { // loop through images
if (document.images[i].src.match(/images\/news.gif/)){
document.images[i].src='http://209.85.62.24/85/152/0/p31797/news.gif'; // replace with Silver Wing Logo
}
}
}
for (i=0; i<document.images.length; i++) { // loop through images
if (document.images[i].src.match(/\/images\/news_res.gif/)){
document.images[i].src='http://209.85.62.24/85/152/0/p31798/news_res.gif'; // replace with Silver Wing Logo
}
}

if (document.title.match(/Google Product Search/)){
for (i=0; i<document.images.length; i++) { // loop through images
if (document.images[i].src.match(/images\/prodsrch_logo.png/)){
document.images[i].src='http://209.85.62.24/85/152/0/p31799/prodsrch_logo.png'; // replace with Silver Wing Logo
}
}
}

// GMAIL
if (document.title.match(/Gmail/)
||location.host.match(/mail/)){
for (i=0; i<document.images.length; i++) { // loop through images
if (document.images[i].src=='https://www.google.com/mail/help/images/logo1.gif'||
document.images[i].src.match(/logo/)){
document.images[i].src='http://209.85.62.24/85/152/0/p31787/gmaillogo.gif'; // replace with Silver Wing Logo
}
}
}


// Common results image
if (document.title.match(/Gmail/)){
//do nothing
}else{
for (i=0; i<document.images.length; i++) { // loop through images
if (document.images[i].src.match(/\/images\/logo_sm.gif/)
|| document.images[i].src.match(/\/images\/google_sm.gif/) ){
document.images[i].src='http://209.85.62.24/85/152/0/p31791/logo_sm.gif'; // replace with Silver Wing Logo
}
}
// Common CSS based results
for (i=0; i<document.styleSheets[0].cssRules.length; i++){
if(document.styleSheets[0].cssRules[i].cssText.match(/\/nav_logo3.png/))
{
var targetrule=document.styleSheets[0].cssRules[i];
targetrule.style.backgroundImage='url(http://209.85.62.24/85/152/0/p31794/nav_logo3.png)';
}
}
for (i=0; i<document.images.length; i++) { // loop through images
if (document.images[i].src.match(/\/nav_next.gif/)){
document.images[i].src='http://209.85.62.24/85/152/0/p31795/nav_next.gif';
}
}
for (i=0; i<document.images.length; i++) { // loop through images
if (document.images[i].src.match(/\/nav_previous.gif/)){
document.images[i].src='http://209.85.62.24/85/152/0/p31796/nav_previous.gif';
}
}
}
// end common results

// Video
for (i=0; i<document.images.length; i++) { // loop through images
if (document.images[i].src.match(/\/logo_video.gif/)){
document.images[i].src='http://209.85.62.24/85/152/0/p31792/logo_video.gif';
}
}
// Groups
for (i=0; i<document.images.length; i++) { // loop through images
if (document.images[i].src.match(/\/groups_medium.gif/)){
document.images[i].src='http://209.85.62.24/85/152/0/p31788/groups_medium.gif';
}
}
//Books
for (i=0; i<document.images.length; i++) { // loop through images
if (document.images[i].src.match(/\/books_sm.gif/)){
document.images[i].src='http://209.85.62.24/85/152/0/p31783/books_sm.gif';
}
}

//Scholar
for (i=0; i<document.images.length; i++) { // loop through images
if (document.images[i].src.match(/\/scholar_logo.gif/)){
document.images[i].src='http://209.85.62.24/85/152/0/p31800/scholar_logo.gif';
}
}

for (i=0; i<document.images.length; i++) { // loop through images
if (document.images[i].src.match(/\/scholar_results.gif/)){
document.images[i].src='http://209.85.62.24/85/152/0/p31801/scholar_results.gif';
}
}
// Finance
if (document.title.match(/Finance/)){
for (i=0; i<document.styleSheets[1].cssRules.length; i++){
if(document.styleSheets[1].cssRules[i].cssText.match(/finance\/images\/sp.png/))
{
var targetrule=document.styleSheets[1].cssRules[i];
targetrule.style.backgroundImage='url(http://209.85.62.24/85/152/0/p31802/sp.png)';
}
}

for (i=0; i<document.styleSheets[0].cssRules.length; i++){
if(document.styleSheets[0].cssRules[i].cssText.match(/finance\/images\/homepage.gif/))
{
var targetrule=document.styleSheets[0].cssRules[i];
targetrule.style.backgroundImage='url(http://209.85.62.24/85/152/0/p31784/Fhomepage.gif)';
}
}
}
// iGoogle
if (document.title.match(/iGoogle/)){
for (i=0; i<document.styleSheets[3].cssRules.length; i++){
if(document.styleSheets[3].cssRules[i].cssText.match(/img0.gmodules.com\/ig\/images\/sprite_arrow_enlarge_max_min_shrink_x_blue.gif/))
{
var targetrule=document.styleSheets[3].cssRules[i];
targetrule.style.backgroundImage='url(http://209.85.62.24/85/152/0/p31804/sprite_arrow_enlarge_max_min_shrink_x_blue.gif)';
}
}
}

}

if (document.title.match(/Google Blog/)){
for (i=0; i<document.images.length; i++) { // loop through images
if (document.images[i].src.match(/images\/g_bsrch_logo.gif/)){
document.images[i].src='http://209.85.62.24/85/152/0/p31785/g_bsrch_logo.gif';
}
}
}
for (i=0; i<document.images.length; i++) { // loop through images
if (document.images[i].src.match(/\/images\/g_bsrch_logo_sm.gif/)){
document.images[i].src='http://209.85.62.24/85/152/0/p31786/g_bsrch_logo_sm.gif';
}
}

}

swap();