Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions ep.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{
"disables": ["@feature:error-gritter"],
"parts":[
"disables": [
"@feature:error-gritter"
],
"parts": [
{
"name": "ep_disable_error_messages",
"hooks": {},
"client_hooks": {
"postAceInit":"ep_disable_error_messages/static/js/disable_error_messages:postAceInit"
}
"hooks": {
"eejsBlock_styles": "ep_disable_error_messages/index:eejsBlock_styles"
},
"client_hooks": {}
}
]
}
9 changes: 9 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
'use strict';

const {hideCSS} = require('ep_plugin_helpers');

// Hide error gritter notifications on the pad page. Previously this
// injected the CSS client-side from postAceInit; serving it from
// eejsBlock_styles instead makes it available before the editor
// initialises, so users never see the error popup flash on load.
exports.eejsBlock_styles = hideCSS('#gritter-container > .error');
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,8 @@
"repository": {
"type": "git",
"url": "https://github.com/ether/ep_disable_error_messages.git"
},
"dependencies": {
"ep_plugin_helpers": "^0.5.0"
}
}
16 changes: 16 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions static/js/disable_error_messages.js

This file was deleted.

Loading