-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get rid of Ajax.Request in favour of plain JS #5
base: master
Are you sure you want to change the base?
Conversation
Remove the `Prototype.js` dependency of the Sound Plugin in favour of a plain JavaScript XMLHttpRequest(). See also jenkinsci/build-monitor-plugin#159
Hi, just had a quick look into this. I'm happy to make this change but as prototype seems to be provided by Jenkins core I can't yet see why this is necessary. Looking at your build-monitor-plugin it looks like the sounds JS is being injected into a page without prototype. How is that happening? I'll have more time to look into this soon, but any background you can give me will be useful. |
Thanks for your feedback, @cafebabe! I could've provided a bit more context in the first place: The build monitor plugin included prototype.js until ~ last year, when they removed it (probably because of compatibility issues with Angular) in jenkinsci/build-monitor-plugin@321cfb2. (See lines 31+32 in that diff). So I started to investigate how I could make the sound plugin work without depending on prototype.js and as it turned out, it only required a few lines of JS (if http://youmightnotneedjquery.com/#request is correct). |
Any update on this one? Or any workaround? |
@ywchang So far none, but you could backport the change from https://github.com/bascht/sounds-plugin/blob/a89fa7aeba2bde568ae383becab87aa67bb527e8/src/main/resources/net/hurstfrost/hudson/sounds/SoundsAgentPageDecorator/header.jelly as a workaround (just override it in a custom JavaScript, in |
@bascht Thanks for reply. But could you please share more details? I know it is a js issue. So should I go to my jenkins server node to directly overwrite this jelly file or I need to fork the source code, make the change, package the plugin by myself and re-install it from my jenkins server? |
Sorry for silence all, this was skipping my inbox due to over aggressive
mail filter.
Will get on to this soon.
Ed
…On 22 March 2017 at 08:52, Chang Yanwei ***@***.***> wrote:
@bascht <https://github.com/bascht> Thanks for reply. But could you
please share more details?
I know it is a js issue. So should I go to my jenkins server node to
directly overwrite this jelly file or I need to fork the source code, make
the change, package the plugin by myself and re-install it from my jenkins
server?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEdiiiowklOtaODsrFEVmVYdLKC7PJWks5roOFlgaJpZM4MDaHZ>
.
|
@cafebabe No worries. :) Thanks for your the update. Hope it helps. ;) |
paging Dr @cafebabe |
What's gone wrong? I've not been here for a while. I clicked on the 'Details' link and getting a DNS error from jenkins.ci.cloudbees.com, what/who triggered this merge? Can't really see what the merge is trying to change (Ajax.Request is already gone). Can someone catch me up pls. |
Remove the
Prototype.js
dependency of the Sound Plugin in favour ofa plain JavaScript XMLHttpRequest().
See also jenkinsci/build-monitor-plugin#159