I would like to customize the version history form in my SharePoint 2013 Online App's document library with Visual Studio 2013.

I have created a button + script that keeps only the last version of each editor (named "versiebeperking"). Now I want to move this button from the document library view to the version history form (version history = versiegeschiedenis in dutch :)). See pic:

enter image description here

How do I achieve this? One way I can think of is that I add the button with jQuery when the Versions.aspx page loads, but how do I do that? Anything that points me in the right direction will be highly appreciated!

1 Answer 1


The page that displays version is versions.aspx and this page resides in the layouts folder. Since its SP Online we don't have access on those files.

You can try loading that page into a div and check whether it can be manipulated using jQuery.

Update - Its a bad idea because core.js file I believe also resides in layouts folder.

Instead handle the button click event from the main page and use JavaScript object model to get the versions and display it in a custom dialog.


  • Thanks, will try that. I also found that versions.aspx is called by a function in core.js, can't I just create a customversions.aspx that is called by a customcore.js? Only thing I would need then is the original source code of the version.aspx, which I can't find... Or is this a bad idea? Apr 9, 2015 at 17:11
  • see my updated answer. Apr 9, 2015 at 17:15
  • true, core.js also resides in the layouts folder, however I already have a customcore.js to eliminate ECB menu items on the same library, which works fine. The only thing missing now is the source code of versions.aspx which I cannot find anywhere... Will give your link a try now Apr 9, 2015 at 19:38
  • thanks Amal, your link will do the trick, especially the last part :) Apr 9, 2015 at 23:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.