// ==UserScript== // @name Vodafone Forum Improvements User Script // @version 3.0.0 // @namespace http://sites.google.com/site/manhinli/projects/vfforum/ // @description This modifies the Vodafone Forum website to allow it to stretch to wide monitors and introduce nifty little things // @include http://forum.vodafone.co.nz/* // @resource vfForumOnloadCSS http://iphone.nzconnection.net/vfforum/3.0/vff.firefox3.css // @resource vfForumJqueryUI http://iphone.nzconnection.net/vfforum/3.0/themes/smoothness/jquery-ui-1.7.1.custom.css // @require http://iphone.nzconnection.net/vfforum/3.0/jquery-1.3.2.min.js // @require http://iphone.nzconnection.net/vfforum/3.0/ui/ui.core.js // @require http://iphone.nzconnection.net/vfforum/3.0/ui/ui.dialog.js // @require http://iphone.nzconnection.net/vfforum/3.0/ui/ui.draggable.js // @require http://iphone.nzconnection.net/vfforum/3.0/ui/ui.droppable.js // @require http://iphone.nzconnection.net/vfforum/3.0/ui/ui.resizable.js // @require http://iphone.nzconnection.net/vfforum/3.0/ui/ui.selectable.js // @require http://iphone.nzconnection.net/vfforum/3.0/ui/ui.slider.js // @require http://iphone.nzconnection.net/vfforum/3.0/ui/ui.tabs.js // @require http://iphone.nzconnection.net/vfforum/3.0/jquery.cookie.js // @require http://iphone.nzconnection.net/vfforum/3.0/jquery.twitter.js // ==/UserScript== GM_log("***** BEFORE *****"); GM_log(GM_listValues()); /****************************************************************************************************/ /* DO NOT EDIT BELOW THIS LINE */ /****************************************************************************************************/ function addGlobalStyle(css) { var style; style = document.createElement('style'); style.type = 'text/css'; style.innerHTML = css; document.getElementsByTagName('head')[0].appendChild(style); } /****************************************************************************************************/ /* Init of settings */ /****************************************************************************************************/ /* This is version... */ var vfForumUSVersion = "3.0.0"; var vfForumUSVersionLetter = "a"; var vfForumUSDeliveryDate = "24052009"; /* Advanced mode */ var advancedModeEnable = GM_getValue("advancedModeEnable","false"); /* Update notifications */ var updateNotificationEnable = GM_getValue("updateNotificationEnable","true"); /* Latest Posts */ var latestPostsEnable = GM_getValue("latestPostsEnable","true"); /* Twitter */ var twitterEnable = GM_getValue("twitterEnable","true"); /* Latest Posts Refresh Interval */ var latestPostsRefreshInterval = GM_getValue("latestPostsRefreshInterval","10"); /* Twitter Refresh Interval */ var twitterRefreshInterval = GM_getValue("twitterRefreshInterval","10"); /* Twitter username*/ var twitterUsername = GM_getValue("twitterUsername","vodafoneNZ"); /* Image resizer */ var imageResizeEnable = GM_getValue("imageResizeEnable","true"); /****************************************************************************************************/ /* Save settings once at start */ /****************************************************************************************************/ var allValues = [ "advancedModeEnable", "latestPostsEnable", "twitterEnable", "latestPostsRefreshInterval", "twitterRefreshInterval", "twitterUsername", "imageResizeEnable", "updateNotificationEnable" ] var allValuesVar = [ advancedModeEnable, latestPostsEnable, twitterEnable, latestPostsRefreshInterval, twitterRefreshInterval, twitterUsername, imageResizeEnable, updateNotificationEnable ] function firstSetAllValues(){ for (i in allValues) { GM_setValue(allValues[i],allValuesVar[i]); } }; function delAllValues(){ for (i in allValues) { GM_deleteValue(allValues[i]); } }; /****************************************************************************************************/ /* Control Panel @ http://forum.vodafone.co.nz/vfforum */ /****************************************************************************************************/ firstSetAllValues(); GM_log("***** AFTER *****"); GM_log(GM_listValues()); if ((window.location == "http://forum.vodafone.co.nz/vfforum" || window.location == "http://forum.vodafone.co.nz/vfforum/") && !($("body").attr("dir"))) { var cssSrc = [ 'http://www.vodafone.co.nz/css/1.2/css/reset.css', 'http://www.vodafone.co.nz/css/1.2/css/main.css' ]; for (i in cssSrc) { var cssAdd = document.createElement('link'); cssAdd.type = 'text/css'; cssAdd.rel = 'stylesheet'; cssAdd.media = 'screen'; cssAdd.href = cssSrc[i]; document.getElementsByTagName('head')[0].appendChild(cssAdd); }; var vfjQueryUICss = GM_getResourceText("vfForumJqueryUI"); addGlobalStyle(vfjQueryUICss); $("body *").remove(); document.title = "Vodafone Forum Improvements User Script Control Panel"; if (GM_getValue("advancedModeEnable") == "true") { /* Advanced interface */ var vfForumAdvancedCPHTML = '
Variable | Value |
'+allValues[i]+' |
This control panel saves settings using Greasemonkey preferences.
This means that when you uninstall and reinstall the script, please make sure that you do not select "Also uninstall associated preferences" otherwise you will lose all settings.
To start editing preferences, click any menu item on the left.
Once you\'ve finished, click \"Save and return to Vodafone Forum\".