Register CSS file from JavaScript in SharePoint Online

There is a way to register a CSS file in SharePoint Online without any help from server side code. Seems Microsoft created a method called “registerCssLink” and attached it directly to window object (no namespace for this).

registerCssLink('/sites/mysite/SitePages/style.css', function (htmlLink) {
    // Do something here with htmlLink object representing link to CSS file
});

It might work on SharePoint 2013 and 2010 as well, but I did not tested it yet. I will post the results of the tests once will be completed.

Advertisements

No access to SharePoint online log

Yesterday, I have decided to buy a subscription for Office 365 SharePoint Online. My developer’s subscription expired and there wasn’t any way to prolong it. So I choose a plan and paid only around 7 EUR, as I have only one user for SharePoint.
This being done, I started to customize my page on the website accessible for public. Once I did a mistake, I received a correlation id. As all developers, I tried to see if there is any way to have access to the log and I ended raising a service request to Microsoft. But, surprise… answer come quick. If I want to know what is behind that correlation id, I need to provide a business justification to Microsoft and server administration will give me requested information.
I really hope Microsoft will provide soon a way to access errors. I am wondering how developers for Office 365 are creating application for SharePoint online. Probably they are doing “blind” development. 🙂