Hi, I'm trying to alter this Greasemonkey Javascript that a friend wrote for me. I would like for it to point to a CSS stylesheet that is located on my hard drive, rather than on my server. I have tried changing the address after @import to file:///C:/folder/folder/file.css without any success. Is it possible to somehow link to a stylesheet that is on my hard drive?
The code:
Code:// ==UserScript== // @name CSS-Test // @include http://www.mycoffeelounge.net/* // @include http://mycoffeelounge.net/* // ==/UserScript== function addStyle(style) { var head = document.getElementsByTagName("HEAD")[0]; var ele = head.appendChild(window.document.createElement( 'style' )); ele.innerHTML = style; return ele; } addStyle('@import "http://www.forboden.com/mcl/123-latest.css";');



Reply With Quote

Bookmarks