Created
January 21, 2015 12:21
-
-
Save wictorwilen/d4e2435f336fcd5abff5 to your computer and use it in GitHub Desktop.
Quickly edit AlternateCSSUrl in SharePoint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copy and paste this into the Console window in any browser debugging tool to edit the Alternate CSS for a site | |
var context = SP.ClientContext.get_current() | |
var web = context.get_web() | |
web.set_alternateCssUrl('assets/test.css') | |
web.update() | |
context.executeQueryAsync( | |
function(){ | |
alert('CSS Updated') | |
}, | |
function() { | |
alert('Error updating CSS') | |
}) | |
Is there a way to revert this to its original value?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for sharing.