Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/* eslint no-console:0 */
// This file is automatically compiled by Webpack, along with any other files
// present in this directory. You're encouraged to place your actual application logic in
// a relevant structure within app/javascript and only use these pack files to reference
// that code so it'll be compiled.
//
// To reference this file, add <%= javascript_pack_tag 'application' %> to the appropriate
// layout file, like app/views/layouts/application.html.erb
import 'jquery'
window.$ = window.jQuery = require('jquery');
import 'bootstrap'
import Rails from 'rails-ujs';
Rails.start();
window.Rails = Rails;
import Turbolinks from 'turbolinks';
window.Turbolinks = Turbolinks;
Turbolinks.start();
import { Application } from "stimulus"
import { definitionsFromContext } from "stimulus/webpack-helpers"
const application = Application.start()
const context = require.context("./controllers", true, /\.js$/)
application.load(definitionsFromContext(context))
import * as ActiveStorage from "activestorage"
ActiveStorage.start()
// Does not process requires when imported like this
import '../packs/src/subscriptions'
// Polyfills.
import 'core-js/fn/array/from';
import 'whatwg-fetch';
// Set up rails-ujs.
import Rails from 'rails-ujs';
Rails.start();
// Scripts.
import 'javascripts/alert';
import 'javascripts/nav';
import 'javascripts/profile';
// Styles.
import 'bootstrap/dist/css/bootstrap';
import 'stylesheets/layout';
import 'stylesheets/nav';
import 'stylesheets/simple_captcha';
const Rails = require('rails-ujs');
Rails.start();
import Turbolinks from "turbolinks";
Turbolinks.start();
// import Filter from 'components/filter'
import WebpackerReact from 'webpacker-react'
import CodeMirror from 'codemirror';
import 'codemirror/lib/codemirror.css';
// import 'codemirror/theme/railscasts.css'
import 'codemirror/mode/htmlmixed/htmlmixed';
// WebpackerReact.setup({Filter})
import "./../src/application.css"
// present in this directory. You're encouraged to place your actual application logic in
// a relevant structure within app/javascript and only use these pack files to reference
// that code so it'll be compiled.
//
// To reference this file, add <%= javascript_pack_tag 'application' %> to the appropriate
// layout file, like app/views/layouts/application.html.erb
import Rails from "rails-ujs";
import Turbolinks from "turbolinks";
import ActionCable from "actioncable";
import "src/collaborative_editor/index";
window.App || (window.App = {});
window.App.cable = ActionCable.createConsumer();
Rails.start();
Turbolinks.start();
// This file is automatically compiled by Webpack, along with any other files
// present in this directory. You're encouraged to place your actual application logic in
// a relevant structure within app/javascript and only use these pack files to reference
// that code so it'll be compiled.
require("@rails/ujs").start()
require("turbolinks").start()
require("@rails/activestorage").start()
require("channels")
import Rails from 'rails-ujs';
import Turbolinks from 'turbolinks';
Rails.start();
Turbolinks.start();
import 'bootstrap/dist/js/bootstrap';
import 'jquery';
import 'jquery/dist/jquery';
import 'jquery-ujs';
import 'jquery-ujs/src/rails';
import 'leaflet/dist/leaflet';
import 'leaflet-providers/leaflet-providers';
import 'leaflet-toolbar/dist/leaflet.toolbar';
import 'leaflet-distortableimage/dist/leaflet.distortableimage';
import 'leaflet-easybutton/src/easy-button';
import 'sparklines/source/sparkline';
import 'glfx-js/dist/glfx';
import 'webgl-distort/dist/webgl-distort';
import Rails from "rails-ujs"
Rails.start()
import * as ActiveStorage from "activestorage"
ActiveStorage.start()
import Turbolinks from "turbolinks"
Turbolinks.start()
import { Application } from "stimulus"
import { definitionsFromContext } from "stimulus/webpack-helpers"
const application = Application.start()
const context = require.context("./controllers", true, /\.js$/)
application.load(definitionsFromContext(context))
import "./cable"
import 'babel-polyfill'
import 'javascripts/change-query'
import * as Rails from 'rails-ujs'
Rails.start()
import 'selectize';
import './bootstrap';
import Vue from 'vue';
import Rails from 'rails-ujs';
import { kebabCase } from 'lodash';
import 'bootstrap-sass/assets/javascripts/bootstrap';
Rails.start();
const app = new Vue({
el: '#app',
mounted() {
if ($('input[name=slug]').length && $('input[name=title], input[name=name]').length) {
$('input[name=title], input[name=name]').on('keyup', event => {
const slug = kebabCase(event.target.value);
$('input[name=slug]').val(slug);
});
}
$('input[name=tags]').selectize({
plugins: ['remove_button'],
persist: false,
import "bootstrap"
import Rails from "rails-ujs"
Rails.start()
import * as ActiveStorage from "activestorage"
ActiveStorage.start()
import Turbolinks from "turbolinks"
Turbolinks.start()
import { Application } from "stimulus"
import { definitionsFromContext } from "stimulus/webpack-helpers"
const application = Application.start()
const context = require.context("./controllers", true, /\.js$/)
application.load(definitionsFromContext(context))
import "./cable"
Notifications.confirm(
element.getAttribute('data-text'),
result => confirmed(element, result)
)
}
const confirmed = (element, result) => {
if (result.value) {
element.removeAttribute('data-confirm-swal')
element.click()
}
}
Rails.delegate(document, 'a[data-confirm-swal]', 'click', handleConfirm)
Rails.start()
smoothscroll.polyfill()