Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// 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("@rails/activestorage").start()
require("channels")
import 'css/custom-bootstrap'
import 'css/animation'
// Uncomment to copy all static images under ../images to the output folder and reference
// them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>)
// or the `imagePath` JavaScript helper below.
//
// const images = require.context('../images', true)
// const imagePath = (name) => images(name, true)
import MatestackUiCore from 'matestack-ui-core'
import '../../matestack/components/header'
import '../../matestack/components/toc/toc'
dialog.confirm(message).then((answer) => {
const completed = Rails.fire(element, "confirm:complete", [answer]);
if (answer && completed) {
// Allow the event to propagate normally and re-dispatch it without
// the confirm data attribute which the Rails internal method is
// checking.
$(element).data("confirm", null);
$(element).removeAttr("data-confirm");
// The submit button click events won't do anything if they are
// dispatched as is. In these cases, just submit the underlying form.
if (ev.type === "click" &&
(
$(element).is('button[type="submit"]') ||
$(element).is('input[type="submit"]')
)
) {
$(element).parents("form").submit();
onDelete(row) {
if (window.confirm(`Remove ${row.game.name} from your library?`)) {
// Post a delete request to the game purchase endpoint to delete the game.
fetch(row.url, {
method: 'DELETE',
headers: {
'X-CSRF-Token': Rails.csrfToken(),
Accept: 'application/json'
},
credentials: 'same-origin'
}).then(response => {
if (response.ok) {
// Emit a delete event to force the parent library component to
// refresh.
this.$emit('delete');
}
});
}
},
loadGames() {
import $ from "jquery"
import "core-js/stable";
import "regenerator-runtime/runtime";
import '../src/evote_check_nota'
import '../src/vizzs/datacharts'
// Images
require.context('../images', true)
// CSS
import './public.scss';
// This needs to be loaded after confirm dialog to bind properly
import Rails from "@rails/ujs"
Rails.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()
// Uncomment to copy all static images under ../images to the output folder and reference
// them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>)
// or the `imagePath` JavaScript helper below.
//
// const images = require.context('../images', true)
// const imagePath = (name) => images(name, true)
import 'core-js/stable'
import 'regenerator-runtime/runtime'
import 'bootstrap/dist/css/bootstrap'
import { singleFileUpload, multipleFileUpload } from 'fileUpload'
// 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()
const Turbolinks = require("turbolinks")
Turbolinks.start()
require("@rails/activestorage").start()
require("channels")
import "controllers"
import "@fontsource/open-sans/400.css"
import "@fontsource/open-sans/400-italic.css"
import "@fontsource/open-sans/700.css"
import "bootstrap"
import "../stylesheets/application"
document.addEventListener("turbolinks:load", () => {
$('[data-toggle="tooltip"]').tooltip()
$('[data-toggle="popover"]').popover()
// 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("@rails/activestorage").start()
require("channels")
// Uncomment to copy all static images under ../images to the output folder and reference
// them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>)
// or the `imagePath` JavaScript helper below.
//
// const images = require.context('../images', true)
// const imagePath = (name) => images(name, true)
// 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")
// Uncomment to copy all static images under ../images to the output folder and reference
// them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>)
// or the `imagePath` JavaScript helper below.
//
// const images = require.context('../images', true)
// const imagePath = (name) => images(name, true)
require("@rails/ujs").start()
// Code for the contact form component starts here.
import 'embed/behavior'
// 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("@rails/activestorage").start()
require("channels")
import {config, dom, library} from '@fortawesome/fontawesome-svg-core';
import { faPlusCircle } from '@fortawesome/free-solid-svg-icons/faPlusCircle';
import { faInfoCircle } from '@fortawesome/free-solid-svg-icons/faInfoCircle';
import { faInfo } from '@fortawesome/free-solid-svg-icons/faInfo';
import { faCheck } from '@fortawesome/free-solid-svg-icons/faCheck';
import { faBan } from '@fortawesome/free-solid-svg-icons/faBan';
import { faAngleRight } from '@fortawesome/free-solid-svg-icons/faAngleRight';
import { faPen } from '@fortawesome/free-solid-svg-icons/faPen';
import { faDoorOpen } from '@fortawesome/free-solid-svg-icons/faDoorOpen';
import { faTimes } from '@fortawesome/free-solid-svg-icons/faTimes';
import { faTrashAlt } from '@fortawesome/free-solid-svg-icons/faTrashAlt';
import { faComment } from '@fortawesome/free-solid-svg-icons/faComment';
import { faSquare } from '@fortawesome/free-solid-svg-icons/faSquare';