Я работаю над проектом с открытым исходным кодом, и есть эта ошибка, что даже когда нет изображений для показа, расширение (приложение в основном представляет собой расширение веб-браузера, которое позволяет вам искать изображения) по-прежнему показывает «Загрузить еще» ", поэтому я подумал, что могу удалить эту ошибку, добавив класс` `` removeButton`` к кнопке, которая применяет следующую настройку
removeButton{
display:none;
}
Но когда я запускаю npm run dev
, чтобы проверить изменения, CSS файлы будут изменены так, как это было раньше, как мне обойти это или есть лучший способ удалить кнопку LoadMore? Сначала я даже пытался удалить кнопку из DOM, но это привело к тому, что кнопка LoadMore не отображалась, даже когда было еще несколько изображений для показа.
Это вывод, когда я запускаю `` npm run dev`` `
> ccsearch-browser-extension@1.0.0 dev /home/gaurav/Desktop/GSOC/ccsearch-browser-extension
> npm run clean && npm run compile-sass-popup:dev && npm run compile-sass-options:dev && npm run build-firefox && npm run build-chrome && npm run build-opera
> ccsearch-browser-extension@1.0.0 clean /home/gaurav/Desktop/GSOC/ccsearch-browser-extension
> rm -rf './dist'
> ccsearch-browser-extension@1.0.0 compile-sass-popup:dev /home/gaurav/Desktop/GSOC/ccsearch-browser-extension
> node-sass src/popup/sass/main.scss src/popup/popup.css
Rendering Complete, saving .css file...
Wrote CSS to /home/gaurav/Desktop/GSOC/ccsearch-browser-extension/src/popup/popup.css
> ccsearch-browser-extension@1.0.0 compile-sass-options:dev /home/gaurav/Desktop/GSOC/ccsearch-browser-extension
> node-sass src/options/sass/main.scss src/options/options.css
Rendering Complete, saving .css file...
Wrote CSS to /home/gaurav/Desktop/GSOC/ccsearch-browser-extension/src/options/options.css
> ccsearch-browser-extension@1.0.0 build-firefox /home/gaurav/Desktop/GSOC/ccsearch-browser-extension
> TARGET=firefox webpack --mode production
Building for firefox...
Hash: 8f02347ff3965262cd25
Version: webpack 4.35.2
Time: 1509ms
Built at: 01/27/2020 2:26:53 AM
Asset Size Chunks Chunk Names
./options/options.js 11.3 KiB 0 [emitted] ./options/options
./popup/popup.js 49.8 KiB 1 [emitted] ./popup/popup
icons/cc128.png 1.98 KiB [emitted]
icons/cc16.png 610 bytes [emitted]
icons/cc24.png 829 bytes [emitted]
icons/cc32.png 1.09 KiB [emitted]
icons/cc48.png 1.59 KiB [emitted]
icons/cc96.png 3.15 KiB [emitted]
manifest.json 828 bytes [emitted]
options/options.css 3.12 KiB [emitted]
options/options.html 13.4 KiB [emitted]
popup/img/cc-logo_white.png 9.77 KiB [emitted]
popup/img/ccheart_red.svg 1.9 KiB [emitted]
popup/img/license_logos/cc-by_icon.svg 980 bytes [emitted]
popup/img/license_logos/cc-cc0_icon.svg 1.43 KiB [emitted]
popup/img/license_logos/cc-nc_icon.svg 1.33 KiB [emitted]
popup/img/license_logos/cc-nd_icon.svg 755 bytes [emitted]
popup/img/license_logos/cc-pdm_icon.svg 1.04 KiB [emitted]
popup/img/license_logos/cc-sa_icon.svg 1.14 KiB [emitted]
popup/img/license_logos/cc_icon.svg 1.66 KiB [emitted]
popup/img/provider_logos/500px_logo.png 5.88 KiB [emitted]
popup/img/provider_logos/CAPL_logo.png 2.69 KiB [emitted]
popup/img/provider_logos/WoRMS_logo.png 5.95 KiB [emitted]
popup/img/provider_logos/animaldiversity_logo.png 3.42 KiB [emitted]
popup/img/provider_logos/behance_logo.svg 1.61 KiB [emitted]
popup/img/provider_logos/brooklynmuseum_logo.png 5.2 KiB [emitted]
popup/img/provider_logos/cc-by_icon.svg 980 bytes [emitted]
popup/img/provider_logos/cc-cc0_icon.svg 1.43 KiB [emitted]
popup/img/provider_logos/cc-nc_icon.svg 1.33 KiB [emitted]
popup/img/provider_logos/cc-nd_icon.svg 755 bytes [emitted]
popup/img/provider_logos/cc-public-domain_icon.svg 1.04 KiB [emitted]
popup/img/provider_logos/cc-sa_icon.svg 1.14 KiB [emitted]
popup/img/provider_logos/cc_icon.svg 1.66 KiB [emitted]
popup/img/provider_logos/clevelandmuseum_logo.png 1.74 KiB [emitted]
popup/img/provider_logos/deviantart_logo.png 4.36 KiB [emitted]
popup/img/provider_logos/digitaltmuseum_logo.png 882 bytes [emitted]
popup/img/provider_logos/eol_logo.png 1.79 KiB [emitted]
popup/img/provider_logos/flickr_logo.png 4.52 KiB [emitted]
popup/img/provider_logos/floraon_logo.png 8.65 KiB [emitted]
popup/img/provider_logos/geographorguk_logo.png 2.98 KiB [emitted]
popup/img/provider_logos/iha_logo.png 1.84 KiB [emitted]
popup/img/provider_logos/mccordmuseum_logo.png 10.1 KiB [emitted]
popup/img/provider_logos/met_logo.png 2.7 KiB [emitted]
popup/img/provider_logos/museumsvictoria_logo.svg 1.67 KiB [emitted]
popup/img/provider_logos/nypl_logo.svg 11.3 KiB [emitted]
popup/img/provider_logos/phylopic_logo.png 4.38 KiB [emitted]
popup/img/provider_logos/rawpixel_logo.png 4.08 KiB [emitted]
popup/img/provider_logos/rijksmuseum_logo.png 2.75 KiB [emitted]
popup/img/provider_logos/sciencemuseum_logo.svg 1.79 KiB [emitted]
popup/img/provider_logos/svgsilh_logo.png 2.81 KiB [emitted]
popup/img/provider_logos/thingiverse_logo.png 1.22 KiB [emitted]
popup/img/provider_logos/thorvaldsensmuseum_logo.png 3.01 KiB [emitted]
popup/img/provider_logos/wikimedia_logo.png 2.59 KiB [emitted]
popup/popup.css 12.3 KiB [emitted]
popup/popup.html 10 KiB [emitted]
popup/vendors/css/comboTreestyle.css 1.37 KiB [emitted]
popup/vendors/js/clipboard.min.js 10.5 KiB [emitted]
popup/vendors/js/comboTreePlugin.js 7.87 KiB [emitted]
popup/vendors/js/imagesloaded.min.js 5.46 KiB [emitted]
popup/vendors/js/jquery.min.js 86.1 KiB [emitted]
Entrypoint ./popup/popup = ./popup/popup.js
Entrypoint ./options/options = ./options/options.js
[0] ./utils.js 2.93 KiB {0} {1} [built]
[1] ./popup/helper.js 3.57 KiB {0} {1} [built]
[10] ./popup/popup.js + 6 modules 43.4 KiB {1} [built]
| ./popup/popup.js 9.72 KiB [built]
| ./popup/base.js 2.75 KiB [built]
| ./popup/spinner.js 819 bytes [built]
| ./popup/infoPopupModule.js 8.67 KiB [built]
| ./popup/searchModule.js 9.12 KiB [built]
| ./popup/filterModule.js 1.75 KiB [built]
| ./popup/bookmarkModule.js 10.6 KiB [built]
[11] ./options/options.js + 2 modules 6.99 KiB {0} [built]
| ./options/options.js 3.58 KiB [built]
| ./options/base.js 722 bytes [built]
| ./options/helper.js 2.7 KiB [built]
+ 8 hidden modules
> ccsearch-browser-extension@1.0.0 build-chrome /home/gaurav/Desktop/GSOC/ccsearch-browser-extension
> TARGET=chrome webpack --mode production
Building for chrome...
Hash: 8f02347ff3965262cd25
Version: webpack 4.35.2
Time: 438ms
Built at: 01/27/2020 2:26:54 AM
Asset Size Chunks Chunk Names
./options/options.js 11.3 KiB 0 [emitted] ./options/options
./popup/popup.js 49.8 KiB 1 [emitted] ./popup/popup
icons/cc128.png 1.98 KiB [emitted]
icons/cc16.png 610 bytes [emitted]
icons/cc24.png 829 bytes [emitted]
icons/cc32.png 1.09 KiB [emitted]
icons/cc48.png 1.59 KiB [emitted]
icons/cc96.png 3.15 KiB [emitted]
manifest.json 805 bytes [emitted]
options/options.css 3.12 KiB [emitted]
options/options.html 13.4 KiB [emitted]
popup/img/cc-logo_white.png 9.77 KiB [emitted]
popup/img/ccheart_red.svg 1.9 KiB [emitted]
popup/img/license_logos/cc-by_icon.svg 980 bytes [emitted]
popup/img/license_logos/cc-cc0_icon.svg 1.43 KiB [emitted]
popup/img/license_logos/cc-nc_icon.svg 1.33 KiB [emitted]
popup/img/license_logos/cc-nd_icon.svg 755 bytes [emitted]
popup/img/license_logos/cc-pdm_icon.svg 1.04 KiB [emitted]
popup/img/license_logos/cc-sa_icon.svg 1.14 KiB [emitted]
popup/img/license_logos/cc_icon.svg 1.66 KiB [emitted]
popup/img/provider_logos/500px_logo.png 5.88 KiB [emitted]
popup/img/provider_logos/CAPL_logo.png 2.69 KiB [emitted]
popup/img/provider_logos/WoRMS_logo.png 5.95 KiB [emitted]
popup/img/provider_logos/animaldiversity_logo.png 3.42 KiB [emitted]
popup/img/provider_logos/behance_logo.svg 1.61 KiB [emitted]
popup/img/provider_logos/brooklynmuseum_logo.png 5.2 KiB [emitted]
popup/img/provider_logos/cc-by_icon.svg 980 bytes [emitted]
popup/img/provider_logos/cc-cc0_icon.svg 1.43 KiB [emitted]
popup/img/provider_logos/cc-nc_icon.svg 1.33 KiB [emitted]
popup/img/provider_logos/cc-nd_icon.svg 755 bytes [emitted]
popup/img/provider_logos/cc-public-domain_icon.svg 1.04 KiB [emitted]
popup/img/provider_logos/cc-sa_icon.svg 1.14 KiB [emitted]
popup/img/provider_logos/cc_icon.svg 1.66 KiB [emitted]
popup/img/provider_logos/clevelandmuseum_logo.png 1.74 KiB [emitted]
popup/img/provider_logos/deviantart_logo.png 4.36 KiB [emitted]
popup/img/provider_logos/digitaltmuseum_logo.png 882 bytes [emitted]
popup/img/provider_logos/eol_logo.png 1.79 KiB [emitted]
popup/img/provider_logos/flickr_logo.png 4.52 KiB [emitted]
popup/img/provider_logos/floraon_logo.png 8.65 KiB [emitted]
popup/img/provider_logos/geographorguk_logo.png 2.98 KiB [emitted]
popup/img/provider_logos/iha_logo.png 1.84 KiB [emitted]
popup/img/provider_logos/mccordmuseum_logo.png 10.1 KiB [emitted]
popup/img/provider_logos/met_logo.png 2.7 KiB [emitted]
popup/img/provider_logos/museumsvictoria_logo.svg 1.67 KiB [emitted]
popup/img/provider_logos/nypl_logo.svg 11.3 KiB [emitted]
popup/img/provider_logos/phylopic_logo.png 4.38 KiB [emitted]
popup/img/provider_logos/rawpixel_logo.png 4.08 KiB [emitted]
popup/img/provider_logos/rijksmuseum_logo.png 2.75 KiB [emitted]
popup/img/provider_logos/sciencemuseum_logo.svg 1.79 KiB [emitted]
popup/img/provider_logos/svgsilh_logo.png 2.81 KiB [emitted]
popup/img/provider_logos/thingiverse_logo.png 1.22 KiB [emitted]
popup/img/provider_logos/thorvaldsensmuseum_logo.png 3.01 KiB [emitted]
popup/img/provider_logos/wikimedia_logo.png 2.59 KiB [emitted]
popup/popup.css 12.3 KiB [emitted]
popup/popup.html 10 KiB [emitted]
popup/vendors/css/comboTreestyle.css 1.37 KiB [emitted]
popup/vendors/js/clipboard.min.js 10.5 KiB [emitted]
popup/vendors/js/comboTreePlugin.js 7.87 KiB [emitted]
popup/vendors/js/imagesloaded.min.js 5.46 KiB [emitted]
popup/vendors/js/jquery.min.js 86.1 KiB [emitted]
Entrypoint ./popup/popup = ./popup/popup.js
Entrypoint ./options/options = ./options/options.js
[0] ./utils.js 2.93 KiB {0} {1} [built]
[1] ./popup/helper.js 3.57 KiB {0} {1} [built]
[10] ./popup/popup.js + 6 modules 43.4 KiB {1} [built]
| ./popup/popup.js 9.72 KiB [built]
| ./popup/base.js 2.75 KiB [built]
| ./popup/spinner.js 819 bytes [built]
| ./popup/infoPopupModule.js 8.67 KiB [built]
| ./popup/searchModule.js 9.12 KiB [built]
| ./popup/filterModule.js 1.75 KiB [built]
| ./popup/bookmarkModule.js 10.6 KiB [built]
[11] ./options/options.js + 2 modules 6.99 KiB {0} [built]
| ./options/options.js 3.58 KiB [built]
| ./options/base.js 722 bytes [built]
| ./options/helper.js 2.7 KiB [built]
+ 8 hidden modules
> ccsearch-browser-extension@1.0.0 build-opera /home/gaurav/Desktop/GSOC/ccsearch-browser-extension
> TARGET=opera webpack --mode production
Building for opera...
Hash: 8f02347ff3965262cd25
Version: webpack 4.35.2
Time: 387ms
Built at: 01/27/2020 2:26:55 AM
Asset Size Chunks Chunk Names
./options/options.js 11.3 KiB 0 [emitted] ./options/options
./popup/popup.js 49.8 KiB 1 [emitted] ./popup/popup
icons/cc128.png 1.98 KiB [emitted]
icons/cc16.png 610 bytes [emitted]
icons/cc24.png 829 bytes [emitted]
icons/cc32.png 1.09 KiB [emitted]
icons/cc48.png 1.59 KiB [emitted]
icons/cc96.png 3.15 KiB [emitted]
manifest.json 805 bytes [emitted]
options/options.css 3.12 KiB [emitted]
options/options.html 13.4 KiB [emitted]
popup/img/cc-logo_white.png 9.77 KiB [emitted]
popup/img/ccheart_red.svg 1.9 KiB [emitted]
popup/img/license_logos/cc-by_icon.svg 980 bytes [emitted]
popup/img/license_logos/cc-cc0_icon.svg 1.43 KiB [emitted]
popup/img/license_logos/cc-nc_icon.svg 1.33 KiB [emitted]
popup/img/license_logos/cc-nd_icon.svg 755 bytes [emitted]
popup/img/license_logos/cc-pdm_icon.svg 1.04 KiB [emitted]
popup/img/license_logos/cc-sa_icon.svg 1.14 KiB [emitted]
popup/img/license_logos/cc_icon.svg 1.66 KiB [emitted]
popup/img/provider_logos/500px_logo.png 5.88 KiB [emitted]
popup/img/provider_logos/CAPL_logo.png 2.69 KiB [emitted]
popup/img/provider_logos/WoRMS_logo.png 5.95 KiB [emitted]
popup/img/provider_logos/animaldiversity_logo.png 3.42 KiB [emitted]
popup/img/provider_logos/behance_logo.svg 1.61 KiB [emitted]
popup/img/provider_logos/brooklynmuseum_logo.png 5.2 KiB [emitted]
popup/img/provider_logos/cc-by_icon.svg 980 bytes [emitted]
popup/img/provider_logos/cc-cc0_icon.svg 1.43 KiB [emitted]
popup/img/provider_logos/cc-nc_icon.svg 1.33 KiB [emitted]
popup/img/provider_logos/cc-nd_icon.svg 755 bytes [emitted]
popup/img/provider_logos/cc-public-domain_icon.svg 1.04 KiB [emitted]
popup/img/provider_logos/cc-sa_icon.svg 1.14 KiB [emitted]
popup/img/provider_logos/cc_icon.svg 1.66 KiB [emitted]
popup/img/provider_logos/clevelandmuseum_logo.png 1.74 KiB [emitted]
popup/img/provider_logos/deviantart_logo.png 4.36 KiB [emitted]
popup/img/provider_logos/digitaltmuseum_logo.png 882 bytes [emitted]
popup/img/provider_logos/eol_logo.png 1.79 KiB [emitted]
popup/img/provider_logos/flickr_logo.png 4.52 KiB [emitted]
popup/img/provider_logos/floraon_logo.png 8.65 KiB [emitted]
popup/img/provider_logos/geographorguk_logo.png 2.98 KiB [emitted]
popup/img/provider_logos/iha_logo.png 1.84 KiB [emitted]
popup/img/provider_logos/mccordmuseum_logo.png 10.1 KiB [emitted]
popup/img/provider_logos/met_logo.png 2.7 KiB [emitted]
popup/img/provider_logos/museumsvictoria_logo.svg 1.67 KiB [emitted]
popup/img/provider_logos/nypl_logo.svg 11.3 KiB [emitted]
popup/img/provider_logos/phylopic_logo.png 4.38 KiB [emitted]
popup/img/provider_logos/rawpixel_logo.png 4.08 KiB [emitted]
popup/img/provider_logos/rijksmuseum_logo.png 2.75 KiB [emitted]
popup/img/provider_logos/sciencemuseum_logo.svg 1.79 KiB [emitted]
popup/img/provider_logos/svgsilh_logo.png 2.81 KiB [emitted]
popup/img/provider_logos/thingiverse_logo.png 1.22 KiB [emitted]
popup/img/provider_logos/thorvaldsensmuseum_logo.png 3.01 KiB [emitted]
popup/img/provider_logos/wikimedia_logo.png 2.59 KiB [emitted]
popup/popup.css 12.3 KiB [emitted]
popup/popup.html 10 KiB [emitted]
popup/vendors/css/comboTreestyle.css 1.37 KiB [emitted]
popup/vendors/js/clipboard.min.js 10.5 KiB [emitted]
popup/vendors/js/comboTreePlugin.js 7.87 KiB [emitted]
popup/vendors/js/imagesloaded.min.js 5.46 KiB [emitted]
popup/vendors/js/jquery.min.js 86.1 KiB [emitted]
Entrypoint ./popup/popup = ./popup/popup.js
Entrypoint ./options/options = ./options/options.js
[0] ./utils.js 2.93 KiB {0} {1} [built]
[1] ./popup/helper.js 3.57 KiB {0} {1} [built]
[10] ./popup/popup.js + 6 modules 43.4 KiB {1} [built]
| ./popup/popup.js 9.72 KiB [built]
| ./popup/base.js 2.75 KiB [built]
| ./popup/spinner.js 819 bytes [built]
| ./popup/infoPopupModule.js 8.67 KiB [built]
| ./popup/searchModule.js 9.12 KiB [built]
| ./popup/filterModule.js 1.75 KiB [built]
| ./popup/bookmarkModule.js 10.6 KiB [built]
[11] ./options/options.js + 2 modules 6.99 KiB {0} [built]
| ./options/options.js 3.58 KiB [built]
| ./options/base.js 722 bytes [built]
| ./options/helper.js 2.7 KiB [built]
+ 8 hidden modules
Содержимое package.json
файла
{
"name": "ccsearch-browser-extension",
"version": "1.0.0",
"description": "CC Search Browser Extension.",
"scripts": {
"lint": "eslint './src/**/*.js'",
"compile-sass-popup:dev": "node-sass src/popup/sass/main.scss src/popup/popup.css",
"compile-sass-options:dev": "node-sass src/options/sass/main.scss src/options/options.css",
"compile-sass-popup:prod": "node-sass src/popup/sass/main.scss src/popup/popup.css --output-style compressed",
"compile-sass-options:prod": "node-sass src/options/sass/main.scss src/options/options.css --output-style compressed",
"compile-sass-popup:watch": "node-sass src/popup/sass/main.scss src/popup/popup.css --watch ",
"compile-sass-options:watch": "node-sass src/options/sass/main.scss src/options/options.css --watch",
"clean": "rm -rf './dist'",
"build-chrome": "TARGET=chrome webpack --mode production",
"build-firefox": "TARGET=firefox webpack --mode production",
"build-opera": "TARGET=opera webpack --mode production",
"package-source-code": "zip -r source-code.zip src tests package.json package-lock.json babel.config.js webpack.config.js LICENSE README.firefox.md",
"package-chrome": "npm run dev && (cd dist/chrome/ && zip -r ../chrome.zip .)",
"package-firefox": "npm run dev && (cd dist/firefox/ && zip -r ../firefox.zip .) && npm run package-source-code",
"dev": "npm run clean && npm run compile-sass-popup:dev && npm run compile-sass-options:dev && npm run build-firefox && npm run build-chrome && npm run build-opera",
"build": "npm run clean && npm run compile-sass-popup:prod && npm run compile-sass-options:prod && npm run build-firefox && npm run build-chrome && npm run build-opera",
"webpack-watch:firefox": "TARGET=chrome webpack --watch",
"webpack-watch:chrome": "TARGET=chrome webpack --watch",
"webpack-watch:opera": "TARGET=opera webpack --watch",
"test": "jest"
},
"repository": {
"type": "git",
"url": "git+https://github.com/creativecommons/ccsearch-browser-extension.git"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/creativecommons/ccsearch-browser-extension/issues"
},
"homepage": "https://github.com/creativecommons/ccsearch-browser-extension#readme",
"devDependencies": {
"@babel/core": "^7.5.5",
"@babel/preset-env": "^7.5.5",
"@types/jest": "^24.0.17",
"copy-webpack-plugin": "^5.0.3",
"eslint": "^5.16.0",
"eslint-config-airbnb-base": "^13.1.0",
"eslint-plugin-import": "^2.17.3",
"jest": "^24.8.0",
"node-sass": "^4.12.0",
"webpack": "^4.35.2",
"webpack-cli": "^3.3.5",
"webpack-dev-server": "^3.7.2"
},
"dependencies": {
"downloadjs": "^1.4.7",
"masonry-layout": "^4.2.2"
}
}