Nathan323 Posted May 11, 2007 Share Posted May 11, 2007 Howdy all, I have recently come across a style sheet that I have named withoutimages.css. I use this when i know a page is particularly heavy in graphics etc, so the page doesnt load with the following: img, applet, object, script {display: none !important;} This is good for pages where i want to quickly access certain info (like a TV guide/weather page. But to do this, i have to open internet options, go to Accessibility, click the box User Stylesheet, click OK, then load the page. Is there any way i can make a shortcut to turn this on with one click? I am thinking about a shortcut I already have on my Explorer toolbar, that toggles file extensions on/off: :: Script to toggle Windows Explorer display of file name extensions @echo off setlocal set key=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced set fileextvalue=HideFileExt reg query %key% /v %fileextvalue% | find "0x1" > NUL if errorlevel 1 goto Hide :Show reg add %key% /v %fileextvalue% /t REG_DWORD /d 0 /f > NUL goto :eof :Hide reg add %key% /v %fileextvalue% /t REG_DWORD /d 1 /f > NUL ..and then also shortcuts like the one that goes to a specific tab on a Control Panel applet, eg. %windir%\system32\control.exe sysdm.cpl,@,3 Ideally i would have the option to turn it on built into shortcut of page, then just have to turn it off manually.. Thanks for any help, Nathan Link to comment Share on other sites More sharing options...
dis Posted May 13, 2007 Share Posted May 13, 2007 (edited) Dim WshShell Set WSHShell = WScript.CreateObject("WScript.Shell") WSHShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Styles\Use My Stylesheet", 0, "REG_DWORD" Wscript.Quit copy into a textfile and save as nocss.vbs! ---- here is another version (with confirmation). you could save this as nocss-confirm.vbs Dim iResponce, WshShell iResponce = MsgBox("Do you want to turn off css?" & vbCrLf & "select yes to disable or no to enable custom css! ", vbYesNo+vbDefaultButton2+vbSystemModal+vbApplicationModal, "on/off css") Set WSHShell = WScript.CreateObject("WScript.Shell") If iResponce = vbYes Then WSHShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Styles\Use My Stylesheet", 0, "REG_DWORD" end if If iResponce = vbNo Then WSHShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Styles\Use My Stylesheet", 1, "REG_DWORD" end if Wscript.Quit(1) !!! 1. after running this script you have to open a new ie window for the changes to take effect! 2. first version will change the reg entry. (turn off the custom css) but doing this invisible. (you will not see anything, it is just a script running invisible) Edited May 13, 2007 by dis Link to comment Share on other sites More sharing options...
Recommended Posts