]> git.mxchange.org Git - friendica.git/commitdiff
Update doignore() in main.js to match new Item\Ignore return type
authorHypolite Petovan <hypolite@mrpetovan.com>
Sun, 1 Dec 2019 04:16:34 +0000 (23:16 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sun, 1 Dec 2019 04:16:34 +0000 (23:16 -0500)
- Remove superfluous jQuery selectors

view/js/main.js

index e15ee77e19592d9c6b4b727e922aff52851114b4..37975dd3385b57db1d3692cefe56a5e7738d6a81 100644 (file)
@@ -649,14 +649,16 @@ function doignore(ident) {
        ident = ident.toString();
        $('#like-rotator-' + ident).show();
        $.get('item/ignore/' + ident, function(data) {
-               if (data.match(/1/)) {
-                       $('#ignored-' + ident).addClass('ignored');
-                       $('#ignored-' + ident).removeClass('unignored');
+               if (data === 1) {
+                       $('#ignored-' + ident)
+                               .addClass('ignored')
+                               .removeClass('unignored');
                        $('#ignore-' + ident).addClass('hidden');
                        $('#unignore-' + ident).removeClass('hidden');
                } else {
-                       $('#ignored-' + ident).addClass('unignored');
-                       $('#ignored-' + ident).removeClass('ignored');
+                       $('#ignored-' + ident)
+                               .addClass('unignored')
+                               .removeClass('ignored');
                        $('#ignore-' + ident).removeClass('hidden');
                        $('#unignore-' + ident).addClass('hidden');
                }