<commit_before>'use strict';
require('css/registrations.css');

var ko = require('knockout');
var $ = require('jquery');

var $osf = require('js/osfHelpers');
var registrationUtils = require('js/registrationUtils');
var RegistrationEditor = registrationUtils.RegistrationEditor;

var ctx = window.contextVars;
var node = window.contextVars.node;

$(document).ready(function() {

    var draftEditor = new RegistrationEditor({
        schemas: '/api/v1/project/schema/',
        create: node.urls.api + 'draft/',
	submit: node.urls.api + 'draft/{draft_pk}/submit/',
        update: node.urls.api + 'draft/{draft_pk}/',
        get: node.urls.api + 'draft/{draft_pk}/'
    }, 'registrationEditor');

    var draft = new registrationUtils.Draft(window.contextVars.draft);
    draftEditor.init(draft);
    window.draftEditor = draftEditor;
    $osf.applyBindings(draftEditor, '#draftRegistrationScope');

});<commit_msg>Remove global editor reference<commit_after>'use strict';
require('css/registrations.css');

var ko = require('knockout');
var $ = require('jquery');

var $osf = require('js/osfHelpers');
var registrationUtils = require('js/registrationUtils');
var RegistrationEditor = registrationUtils.RegistrationEditor;

var ctx = window.contextVars;
var node = window.contextVars.node;

$(document).ready(function() {

    var draftEditor = new RegistrationEditor({
        schemas: '/api/v1/project/schema/',
        create: node.urls.api + 'draft/',
	submit: node.urls.api + 'draft/{draft_pk}/submit/',
        update: node.urls.api + 'draft/{draft_pk}/',
        get: node.urls.api + 'draft/{draft_pk}/'
    }, 'registrationEditor');

    var draft = new registrationUtils.Draft(window.contextVars.draft);
    draftEditor.init(draft);
    $osf.applyBindings(draftEditor, '#draftRegistrationScope');
});
{'fraction_non_alphanumeric': 0.1574585635359116, 'fraction_numerical': 0.0011049723756906078, 'mean_word_length': 4.438438438438438, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4223523', 'n_tokens_mistral': 549, 'n_tokens_neox': 548, 'n_words': 105}