How to set Disqus Share link to window.location.pathname + window.location.search?
So the solution was to add my own Javascript file and just clear the drupal settings for disqus like this:


Added Javascript file to modules/custom/MYMODULE/MYMODULE.libraries.yml


disqus-overrides:
  version: VERSION
  js:
    js/disqus_overrides.js: {}
  dependencies:
    - core/drupalSettings



Created a new file in modules/custom/MYMODULE/js/disqus_overrides.js


drupalSettings['disqus']['identifier'] = '';
    drupalSettings['disqus']['title'] = '';
    drupalSettings['disqus']['url'] = '';


Then force this file to be loaded on every page load in modules/custom/MYMODULE/MYMODULE.module (this could be optimized to only load on those pages with the Disqus comment field, but I don't know how yet):


function MYMODULE_page_attachments(array &amp;$attachments) {
        $attachments['#attached']['library'][] = 'MYMODULE/disqus-overrides';
    }