Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Quickly edit AlternateCSSUrl in SharePoint
// 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')
})
@larnera
Copy link

larnera commented Jan 30, 2015

Thanks for sharing.

@marqueone
Copy link

marqueone commented Jul 17, 2015

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