Tag Archives: javascript

Using emojis for easier JavaScript debugging

I normally don’t care much for emojis, but lately I’ve found them to be helpful when working with JavaScript. The JavaScript console may not be the most elegant way to debug, but it’s the quickest and sometimes only reasonable way … Continue reading

Posted in Development, Tips | Tagged , , , | Leave a comment

Show React dialogs fluently with hooks and promises

Suppose you have a React component that displays a modal dialog and returns the result:

The typical way to use it would be to have a state variable controlling if it should be displayed or not, and a function … Continue reading

Posted in Development, Tutorials | Tagged , , , , , , , , | Leave a comment

Open a SharePoint list in classic experience if link is missing

The modern list experience in SharePoint is the default by now. But you can still revert to classic experience by clicking the link under the left navigation. But on communication sites the left nav is turned off by design. If … Continue reading

Posted in Tips | Tagged , , , , , | Leave a comment

Popup opens as new browser window in Edge and Internet Explorer

Problem: Opening a popup with JavaScript in Edge or Internet Explorer results in a new browser window instead of a popup window. For example:

Communication between the new window and originating site is not possible either, since both popup (above) … Continue reading

Posted in Development | Tagged , , , , , | Leave a comment

Internet Explorer: ScriptImports is undefined

Today I spent way too much time on hunting down a bug that occurred in Internet Explorer 11 running our intranet solution on SharePoint Online / 2016. The problem showed itself by throwing the following error in the console: The … Continue reading

Posted in Development | Tagged , , , , , | Leave a comment

Extending the JavaScript console with history recording

The browser JavaScript console is a web developers best friend. Using console.log()  is essential for debugging your web apps. But there are a few annoyances. Two things that bother me for a while are: Reloading the page clears the console. … Continue reading

Posted in Development, Tutorials | Tagged , , , , , | Leave a comment

Heads-up if you use ADAL.JS on a site added to the “Trusted Sites” zone

When working on a SharePoint Online solution that is using the ADAL.JS library for authentication, a customer reported strange problems. In our solution, our site sends the client to the authentication authority (Azure AD), which authenticates the client and forwards … Continue reading

Posted in Development, Tips | Tagged , , , , , , , , | Leave a comment

Edit SharePoint property bags with SpPropertyBag.js bookmarklet

SpPropertyBag.js is a drop-in JavaScript for editing SharePoint web properties (the “property bag”). Simply paste the script into the JavaScript console and run it to open a dialog where you can view, edit, add, and remove properties: Even easier is to … Continue reading

Posted in Development | Tagged , , , | 5 Comments

Using wildcard matching in any programming language

Most computer savvy persons are familiar with using wildcards when listing files and similar operations. Wildcards are quite easy to understand and use. An asterisk * means match anything, and the lesser known question mark ? matches a single character. … Continue reading

Posted in Development | Tagged , , , , , , , | 1 Comment