Not sure about Greasemonkey, but an easy approach to modify any resource on (url, image, script) would be using Requestly Redirect Rule.
- Open Requesly app from icon (or navigate to http://app.requestly.in/rules)
- Click "New Rule"
- Select "Redirect Request"
- Enter Request source (in your case, "URL""Equals":[url-to-jquery eg: "http://some-host.com/jquery1.4.js"]
- Enter Destination (in your case, URL to required jquery version CDN eg: "http://any-host.com/jquery3.2.js")
- Click Save
- Done! Now all the requests made by your browser to source url will be redirected to your defined destination url.
Note:
- If you don`t have CDN, you can host the file on web using Requestly Library. Then choose "Select from Library" below Destination URL field.
- The same results can be achieved using Cancel Request rule to block existing request. Then use Insert Scripts rule to insert your version of script into the webpage.
PS: I work at Requestly.