Can I declare variable in Core.Js file and assign value on any SharePoint page. Like putting CEWP on page and setting variable(residing in Core.js file) value dynamially?
I tried putting one variable in Core.js file, and in CEWP I reset value to x, but I am not getting x value in any function inside Core.js file. Let me know if this could happen, if yes than how?
Thanks,
Ashish Chotalia
My understanding is that if you modify core.js, you are in an unsupported state, so i cannot recommend you do that.
Could you explain what you are trying to do and there is probably a better way.
UPDATE
Do you know that AddDocLibMenuItems
already has a hook in it, to allow it to be overridden
function AddDocLibMenuItems(m, ctx)
{
if (typeof(Custom_AddDocLibMenuItems) !="undefined")
{
if (Custom_AddDocLibMenuItems(m, ctx))
return;
}
If you defined a function Custom_AddDocLibMenuItems
, you should be able to work without customising core.js