Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
var InitCommon= InitCommon || (function(){
var SearchVerticalClickFix = function SearchVerticalClickFix(){
if (typeof(STSNavigate) != 'undefined') {
STSNavigate = function(a) {
a=GetAbsoluteUrl(a);if(ajaxNavigate.get_search().indexOf("IsDlg=1")!=-1)if(a.indexOf("?")!=-1)if(String(a.match(RegExp("&$")))!="&")a=a+"&IsDlg=1";else a=a+"IsDlg=1";else a=a+"?IsDlg=1";var framed;try{var test = window.frameElement}catch(frameException){framed = true;}; if((!framed && window.frameElement!=null)||typeof SPUpdatePage==="undefined"||typeof SPUpdatePage!=="undefined"&&SPUpdatePage(a))if(isPortalTemplatePage(a))window.top.location.href=STSPageUrlValidation(a);else window.location.href=STSPageUrlValidation(a)
};
}
};
var init= function init(){
SearchVerticalClickFix();
}
return{
init:init
}
})();
$(document).ready(function() {
InitCommon.init();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment