22 lines
584 B
JavaScript
22 lines
584 B
JavaScript
import { Controller } from 'stimulus';
|
|
import Inputmask from "inputmask";
|
|
|
|
/*
|
|
* This is an example Stimulus controller!
|
|
*
|
|
* Any element with a data-controller="hello" attribute will cause
|
|
* this controller to be executed. The name "hello" comes from the filename:
|
|
* hello_controller.js -> "hello"
|
|
*
|
|
* Delete this file or adapt it for your use!
|
|
*/
|
|
export default class extends Controller {
|
|
connect() {
|
|
var a = this.element
|
|
var favorites = localStorage.getItem('favorites');
|
|
if (favorites) {
|
|
this.element.href = '/favorites/?q=' + favorites
|
|
}
|
|
}
|
|
}
|