def is_js_registered(app, filename):
    """
    Checks whether a given js file has been added to the Sphinx register.
    """
    for js_file, _ in app.registry.js_files:
        if filename == js_file:
            return True
    return False