hiding open with explorer based on users group permission who log in system by following j query,
<script type="text/javascript" language="javascript" src="https://intranet.sharepoint.com/sites/portal/SiteAssets/jquery-1.8.2.js" ></script>
<script type="text/javascript" language="javascript" src="https://intranet.sharepoint.com/sites/portal/SiteAssets/jquery.SPServices-2014.02.js" ></script>
<script type="text/javascript" language="javascript">
_spBodyOnLoadFunctionNames.push("ConfigRcoTopNav");
function ConfigRcoTopNav() {
$().SPServices({
operation: "GetGroupCollectionFromUser",
userLoginName: $().SPServices.SPGetCurrentUser(),
async: true,
completefunc: function (xData, Status) {
if (($(xData.responseXML).find("Group[Name='EndUsersGroup']").length) == 1) {
//document.getElementById('suiteBarTop').style.display = 'none';
$('div.o365cs-nav-leftAlign').css({'display':'none'});
$('#O365_MainLink_Settings').css({'display':'none'});
$('#O365_MainLink_Help').css({'display':'none'});
$('#O365_SubLink_ShellO365Settings').css({'display':'none'});
$('#O365_SubLink_ShellAboutMe').css({'display':'none'});
$('#O365_SubLink_SuiteMenu_zz2_ID_PersonalInformation').css({'display':'none'});
$('#O365_SubLink_SuiteMenu_zz4_ID_PersonalizePage').css({'display':'none'});
$('#O365_SubLink_SuiteMenu_zz5_ID_SwitchView').css({'display':'none'});
$('button.o365cs-nav-item o365cs-nav-button o365button ms-bgc-w ms-fcl-b o365cs-spo-topbarMenuOpen').css({'display':'none'});
//$('#RibbonContainer-TabRowRight').css({'display':'none'});
$('div.ms-cui-TabRowRight s4-trc-container s4-notdlg ms-core-defaultFont').css({'display':'none'});
document.getElementById('RibbonContainer-TabRowRight').style.display = 'none';
HideOpenFileWithExplorer();
}
}
});
}
function HideOpenFileWithExplorer() {
if(window.location.href.indexOf('Forms') != -1) {
$('a[title="Browse"]').click();
setTimeout(
function() {
var objLibrary = $("li[title='Library']");
if(objLibrary.length > 0) {
objLibrary.click(function() {
setTimeout(
function() {
$("a[id='Ribbon.Library.Actions.OpenWithExplorer-Medium']").hide();
},
92);
});
}
$("li[title='Library']").click();
},
1800);
}
}
</script>
// make sure everything copy and paste proper in master page to make it across SharePoint environment.