feat: ship with own version of jquery
This commit is contained in:
Родитель
3a972d0842
Коммит
622088d573
|
@ -54,6 +54,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@jsxc/jsxc": "^4.0.0-rc.2",
|
||||
"jquery": "^3.5.1",
|
||||
"libsignal-protocol": "https://github.com/signalapp/libsignal-protocol-javascript",
|
||||
"tslint": "^6.1.0",
|
||||
"typescript-formatter": "^7.2.2"
|
||||
|
|
|
@ -106,5 +106,9 @@ function getAvatarUrl(username: string, size: number) {
|
|||
}
|
||||
|
||||
function setPlaceholder(element, username: string, displayName?: string) {
|
||||
(<any> element).imageplaceholder(username, displayName);
|
||||
let imagePlaceholder = (<any> window).$(element).imageplaceholder?.bind($(element));
|
||||
|
||||
if (typeof imagePlaceholder === 'function') {
|
||||
imagePlaceholder(username, displayName);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,13 @@ import Bootstrap from './Bootstrap';
|
|||
import './settings/personal';
|
||||
import './settings/admin';
|
||||
|
||||
$(document).on('ajaxSend', function(_elm, xhr, settings) {
|
||||
if (settings.crossDomain === false) {
|
||||
xhr.setRequestHeader('requesttoken', OC.requestToken);
|
||||
xhr.setRequestHeader('OCS-APIREQUEST', 'true');
|
||||
}
|
||||
});
|
||||
|
||||
(function() {
|
||||
let bootstrap = new Bootstrap();
|
||||
|
||||
|
|
|
@ -94,9 +94,12 @@ const config = {
|
|||
alias: {}
|
||||
},
|
||||
externals: {
|
||||
'jquery': 'jQuery',
|
||||
},
|
||||
plugins: [
|
||||
new webpack.ProvidePlugin({
|
||||
$: 'jquery',
|
||||
jQuery: 'jquery'
|
||||
}),
|
||||
new MiniCssExtractPlugin({
|
||||
filename: 'css/bundle.css',
|
||||
}),
|
||||
|
|
|
@ -3270,6 +3270,11 @@ jquery@^3.4.1:
|
|||
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.4.1.tgz#714f1f8d9dde4bdfa55764ba37ef214630d80ef2"
|
||||
integrity sha512-36+AdBzCL+y6qjw5Tx7HgzeGCzC81MDDgaUP8ld2zhx58HdqXGoBd+tHdrBMiyjGQs0Hxs/MLZTu/eHNJJuWPw==
|
||||
|
||||
jquery@^3.5.1:
|
||||
version "3.5.1"
|
||||
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.5.1.tgz#d7b4d08e1bfdb86ad2f1a3d039ea17304717abb5"
|
||||
integrity sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg==
|
||||
|
||||
js-base64@^2.1.8:
|
||||
version "2.5.2"
|
||||
resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.5.2.tgz#313b6274dda718f714d00b3330bbae6e38e90209"
|
||||
|
|
Загрузка…
Ссылка в новой задаче