This repository was archived by the owner on Mar 29, 2021. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -159,10 +159,14 @@ idrinth.core = {
159159 if ( window . Notification . permission === "denied" ) {
160160 return false ;
161161 }
162- return new window . Notification ( title , {
163- icon : "https://dotd.idrinth.de/Resources/Images/logo.png" ,
164- body : content
165- } ) ;
162+ var data = { } ;
163+ if ( idrinth . settings . get ( 'notification#image' ) ) {
164+ data . icon = "https://dotd.idrinth.de/Resources/Images/logo.png" ;
165+ }
166+ if ( idrinth . settings . get ( 'notification#content' ) ) {
167+ data . body = content ;
168+ }
169+ return new window . Notification ( title , data ) ;
166170 } ,
167171 /**
168172 *
Original file line number Diff line number Diff line change @@ -134,6 +134,16 @@ idrinth.settings = {
134134 * @type Boolean
135135 */
136136 message : true ,
137+ /**
138+ *
139+ * @type Boolean
140+ */
141+ content : true ,
142+ /**
143+ *
144+ * @type Boolean
145+ */
146+ image : true ,
137147 /**
138148 *
139149 * @type Boolean
Original file line number Diff line number Diff line change @@ -744,6 +744,16 @@ idrinth.ui = {
744744 rType : '#input' ,
745745 type : 'checkbox' ,
746746 label : 'chat.notification.message'
747+ } , {
748+ name : 'notification#content' ,
749+ rType : '#input' ,
750+ type : 'checkbox' ,
751+ label : 'chat.notification.content'
752+ } , {
753+ name : 'notification#image' ,
754+ rType : '#input' ,
755+ type : 'checkbox' ,
756+ label : 'chat.notification.image'
747757 } ] , 'chat' ) ,
748758 {
749759 css : 'idrinth-line' ,
You can’t perform that action at this time.
0 commit comments