<commit_before>$.extend(true, doaj, {

    publisherJournalsSearch : {
        activeEdges : {},

        makeUpdateRequest : function (resultobj) {
            if (resultobj.admin && resultobj.admin.hasOwnProperty("in_doaj")) {
                if (resultobj.admin.in_doaj === false) {
                    return false;
                }
            }

            var result = {label : "", link : ""};
            if (resultobj.admin && resultobj.admin.current_application) {
                var idquery = '%7B%22query%22%3A%7B%22query_string%22%3A%7B%22query%22%3A%22' + resultobj['id'] + '%22%7D%7D%7D';
                result.link = doaj.publisherJournalsSearchConfig.journalUpdateRequestsUrl + "?source=" + idquery;
                result.label = 'View Update';
            } else {
                result.link = doaj.publisherJournalsSearchConfig.journalUpdateUrl + resultobj['id'];
                result.label = 'Update';
            }
            return result;
        },

        shareSealLogo: function(resultobj) {
            // Add Display Seal as an action
            if (!edges.objVal("admin.seal", resultobj, false)) {
                return false;
            }
            let result = {
                label: "Download the Seal",
                link: "#",
                data: {
                    toggle: "modal",
                    target: "#modal-embed-seal"
                }
            }

            var issn = resultobj.bibjson.pissn;
            if (!issn) {
                issn = resultobj.bibjson.eissn;
            }
            if (issn) {
                issn = edges.escapeHtml(issn);
            }

            result.modal = '<section class="modal in" id="modal-embed-seal" tabindex="-1" role="dialog" style="display: none;"> \
                    <div class="modal__dialog" role="document">\
                        <h2 class="modal__title">Download the Seal</h2>\
                        <p>Copy and paste this HTML to display the DOAJ Seal on your website:</p> \
                        <p><code>&lt;a href="https://doaj.org/toc/' + issn + '" target="_blank" style="display: block; width: 150px; height: auto;"&gt;&lt;img src="https://doaj.org/static/doaj/images/logo/seal.png"/&gt;&lt;/a&gt;</code></p>\
                        <button class="button" data-dismiss="modal" class="modal__close no-margins">Close</button>\
                    </div>\
                </section>';
<commit_msg>identify each modal with their object id so the correct modal can be opened<commit_after>$.extend(true, doaj, {

    publisherJournalsSearch : {
        activeEdges : {},

        makeUpdateRequest : function (resultobj) {
            if (resultobj.admin && resultobj.admin.hasOwnProperty("in_doaj")) {
                if (resultobj.admin.in_doaj === false) {
                    return false;
                }
            }

            var result = {label : "", link : ""};
            if (resultobj.admin && resultobj.admin.current_application) {
                var idquery = '%7B%22query%22%3A%7B%22query_string%22%3A%7B%22query%22%3A%22' + resultobj['id'] + '%22%7D%7D%7D';
                result.link = doaj.publisherJournalsSearchConfig.journalUpdateRequestsUrl + "?source=" + idquery;
                result.label = 'View Update';
            } else {
                result.link = doaj.publisherJournalsSearchConfig.journalUpdateUrl + resultobj['id'];
                result.label = 'Update';
            }
            return result;
        },

        shareSealLogo: function(resultobj) {
            // Add Display Seal as an action
            if (!edges.objVal("admin.seal", resultobj, false)) {
                return false;
            }
            let result = {
                label: "Download the Seal",
                link: "#",
                data: {
                    toggle: "modal",
                    target: "#modal-embed-seal-" + resultobj.id
                }
            }

            var issn = resultobj.bibjson.pissn;
            if (!issn) {
                issn = resultobj.bibjson.eissn;
            }
            if (issn) {
                issn = edges.escapeHtml(issn);
            }

            result.modal = '<section class="modal in" id="modal-embed-seal-' + resultobj.id + '" tabindex="-1" role="dialog" style="display: none;"> \
                    <div class="modal__dialog" role="document">\
                        <h2 class="modal__title">Download the Seal</h2>\
                        <p>Copy and paste this HTML to display the DOAJ Seal on your website:</p> \
                        <p><code>&lt;a href="https://doaj.org/toc/' + issn + '" target="_blank" style="display: block; width: 150px; height: auto;"&gt;&lt;img src="https://doaj.org/static/doaj/images/logo/seal.png"/&gt;&lt;/a&gt;</code></p>\
                        <button class="button" data-dismiss="modal" class="modal__close no-margins">Close</button>\
                    </div>\
                </section>';

{'fraction_non_alphanumeric': 0.13608040201005026, 'fraction_numerical': 0.012462311557788945, 'mean_word_length': 1.6107030430220357, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '671706', 'n_tokens_mistral': 1475, 'n_tokens_neox': 1382, 'n_words': 267}