By Seifer
—
Last update
Jun 26, 2008
—
Installed
3,181 times.
// ==UserScript==
// @name Custom MySpace Home
// @namespace Seifer - http://userscripts.org/users/33118
// @description Version 1.52
// @include http://home.myspace.com/index.cfm?fuseaction=use*
// ==/UserScript==
// ==============================================
// DO NOT EDIT ANYTHING IN THIS SCRIPT UNLESS YOU KNOW WHAT YOU ARE DOING!
//
//
// ALL OPTIONS ARE CHANGED VIA THE GREASEMONKEY USERSCRIPTS MENU.
//
// To access this right click the greasemonkey icon in the bottom right of your browser
// when on your MySpace homepage, then click User Script Commands..
// Now press one of the commands that you wish to perform.
// A confirmation will be displayed to let you know that its worked.
// ==============================================
wide_screen = GM_getValue('wide_screen',true);
use_new_controlpanel = GM_getValue('use_new_controlpanel',true);
hau_show_settings = GM_getValue('hau_show_settings',true);
if ($('col3'))
{
GM_registerMenuCommand("Toggle Wide Screen Mode", function() { if(GM_getValue('wide_screen',true) == true) { GM_setValue('wide_screen',false);
alert('Wide screen mode disabled.\r\nRefresh page to see any changes.'); } else { GM_setValue('wide_screen',true); alert('Wide screen mode enabled.\r\nRefresh the page to see any changes.'); } });
if ($('GM_Script_Links') && $('GM_Script_Links').innerHTML.match('scripts/show/6365">GM')) {
GM_registerMenuCommand("Toggle Display of Home Auto-Update Controls", function() { if(GM_getValue('hau_show_settings',true) == true) {
GM_setValue('hau_show_settings',false); alert('Home Auto-Update Controls now set to hide.\r\nRefresh page to see any changes.'); } else {
GM_setValue('hau_show_settings',true); alert('Home Auto-Update Controls now set to display.\r\nRefresh the page to see any changes.'); } });
}
removeElement('addressbookintl'); // Hides the address book notification
removeElement('findFriendsLinks'); // Hides the find friends section
removeElement('tkn_leaderboardDiv'); // Hides the tabbed ads
removeElement('googlebar'); // Hides the google text ads
removeElement('grayboxrounded'); // Hides various links box
removeElement('appnavigation'); // Hides the application box
removeElement('googleadtest'); // remove new sponsered ads
// middleAds2 = $('ad-hdr');
// while(middleAds2.getAttribute('class') != "middleAds2") {
// middleAds2 = middleAds2.parentNode;
// }
// middleAds2.setAttribute('style','display:none'); // remove new sponsered ads
if($('mobileunit')) { document.getElementById('mobileunit').setAttribute('style','display:none'); } // Hides the mobile myspace box
if($('tomannouncement')) {
GM_addStyle('#gm_hideannounce {text-align:right;margin-top:10px !important;,margin-bottom:-20px !important;;}');
hideannounce = document.createElement('div');
hideannounce.setAttribute('id','gm_hideannounce');
hideannounce.innerHTML = '<a href="#" id="gm_hideannouncelink">Got it! Hide this announcement.</a>';
$('tomannouncement').lastChild.previousSibling.appendChild(hideannounce);
document.getElementById('gm_hideannouncelink').addEventListener('click', function(event) {
GM_setValue('tomannouncement',$('tomannouncement').innerHTML); $('tomannouncement').setAttribute('style','display:none'); }, true);
if(GM_getValue("tomannouncement",false) == $('tomannouncement').innerHTML) {
$('tomannouncement').setAttribute('style','display:none');
} else {
}
}
////////////////////////////////
// Create script link-back
//
if (!$('GM_Script_Links')) {
GM_addStyle('#GM_Script_Links a {display:block;color:#CCC!important;}')
var gsl = document.createElement('p');gsl.setAttribute('id','GM_Script_Links');$('col1').appendChild(gsl);
}
$('GM_Script_Links').innerHTML +=
'<a href="http://userscripts.org/scripts/show/22796">GM - Custom Home Page</a>';
//
// if (document.getElementById('GM_Script_Links') && document.getElementById('GM_Script_Links').innerHTML.match('scripts/show/22796">GM')) { } // used to test for this
////////////////////////////////
$('col3').setAttribute('id','col3temp');
newrow = document.createElement('div');
newrow.setAttribute('id','row');
newrow.setAttribute('class','GM_row');
newcol = document.createElement('div');
newcol.setAttribute('id','col3');
$('mainContent').insertBefore(newcol,$('col3temp'));
removeElement('col3temp');
$('mainContent').appendChild(newrow);
if(wide_screen) {
if($('tomannouncement')) { $('col1').appendChild($('tomannouncement')); }
$('col3').appendChild($('friendUpdate'));
$('col1').appendChild($('userstatus'));
$('col1').appendChild($('bulletins'));
$('col2').appendChild($('userdisplay'));
$('col2').appendChild($('updates'));
//$('col2').appendChild($('manage'));
if(use_new_controlpanel = false) {
$('col2').appendChild($('manage'));
}
$('row').appendChild($('friendspace'));
} else {
$('col3').appendChild($('friendUpdate'));
$('row').appendChild($('friendspace'));
}
$('row').appendChild($('GM_Script_Links'));
if ($('GM_Script_Links') && $('GM_Script_Links').innerHTML.match('scripts/show/6365">GM')) {
if(!hau_show_settings) {
$('HAU_Choices').setAttribute('style','display:none;');
}
}
if ($('GM_Script_Links') && $('GM_Script_Links').innerHTML.match('scripts/show/24394">GM')) {
$('friendspace').parentNode.insertBefore($('comments'),$('friendspace'));
}
// GM_addStyle('.friend { height:110px; overflow:hidden; }');
GM_addStyle(".friend {"+
"height:150px;"+
"display:block;"+
"width:100px;"+
"overflow:hidden;"+
"}"+
".friend a {"+
"display:block;"+
"height:20px;"+
"line-height:10px !important;"+
"overflow:hidden;"+
"margin-bottom:-12px"+
"}"+
".friend img {"+
"display:block;"+
"position:absolute;"+
"max-height: 100px;"+
"}");
GM_addStyle('#friends .clear, #HAU_Onlines .clear { clear:none !important; }');
GM_addStyle('.activityFeed {display:block;overflow:auto;height:562px;}');
if(wide_screen) {
if (document.getElementById('GM_Script_Links') && document.getElementById('GM_Script_Links').innerHTML.match('scripts/show/6365">GM')) {
GM_addStyle('#friendspace div.middle div div div#friends div.friend, #HAU_Onlines .friend { margin:10px -76px !important; }');
GM_addStyle('.friend a { padding-left:110px; width:100px; } .friend a img {padding-left:10px;} .friend img {padding-left:110px;} ');
GM_addStyle('#HAU_Onlines .friend img {padding-top:15px;}');
} else {
GM_addStyle('#friendspace div.middle div div div#friends div.friend, #HAU_Onlines .friend { margin:10px 25px !important; }');
}
GM_addStyle('.GM_row { margin-left:10px; width:1220px; }');
GM_addStyle('#col1 {width:510px !important;}');
GM_addStyle('#col2 {width:180px !important;}');
GM_addStyle('#col3 {width:510px !important;}');
GM_addStyle('#main {width:1240px !important;}');
GM_addStyle('#wrap {width:100% !important;}');
} else {
if (document.getElementById('GM_Script_Links') && document.getElementById('GM_Script_Links').innerHTML.match('scripts/show/6365">GM')) {
GM_addStyle('#friendspace div.middle div div div#friends div.friend, #HAU_Onlines .friend { margin:10px -40px !important; }');
} else {
GM_addStyle('#friendspace div.middle div div div#friends div.friend, #HAU_Onlines .friend { margin:10px 40px !important; }');
}
GM_addStyle('.GM_row { margin-left:10px; width:940px; }');
GM_addStyle('#col2 {width:400px !important;}');
GM_addStyle('#col3 {width:340px !important;}');
}
GM_addStyle('#statusUpdates {display:block;height:200px;overflow:auto;}');
GM_addStyle('#mainContent {padding-bottom:10px;}');
GM_addStyle('#HAU_Onlines .friend a {display:block;}');
GM_addStyle('#HAU_Friends {max-height:10000px !important; overflow:hidden !important;}');
}
function getAtt(elementId,att) { if(document.getElementById(elementId)) { return document.getElementById(elementId).getAttribute(att); } else { return false;
} }
function removeElement(elementId) { if(document.getElementById(elementId )) { document.getElementById(elementId).setAttribute('style','display:none'); return true; } else { return false; } }
function $(elementId) { return document.getElementById(elementId); } // shortcut from "Prototype Javascript Framework"
function $$(elementName) { return document.getElementsByName(elementName); }