Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
setPageSize () {
const url = Url(window.location.href)
const q = Url.qs.parse(url.query)
delete q.offset
delete q.height
q[this.pagesizeTarget.dataset.offsetkey] = this.pagesizeTarget.dataset.offset
q.rows = this.pagesizeTarget.selectedOptions[0].value
if (this.hasVotestatusTarget) {
q.byvotestatus = this.votestatusTarget.selectedOptions[0].value
}
url.set('query', q)
Turbolinks.visit(url.toString())
}
import removeWww from './removeWww';
import objectKeys from './objectKeys';
import { isArray } from './type';
import urlParse from 'url-parse';
import punycode from 'punycode';
import {
SESSION_CAMPAIGN,
SESSION_DIRECT,
SESSION_INTERNAL,
SESSION_ORGANIC,
SESSION_REFERRAL,
SESSION_SOCIAL,
} from "../Constants";
const qs = urlParse.qs;
const ENGINE_GOOGLE = 'google';
const ENGINE_YANDEX = 'yandex';
const ENGINE_MAILRU = 'mailru';
const ENGINE_RAMBLER = 'rambler';
const ENGINE_BING = 'bing';
const ENGINE_YAHOO = 'yahoo';
const ENGINE_NIGMA = 'nigma';
const ENGINE_DUCKDUCKGO = 'duckduckgo';
const ENGINE_FACEBOOK = 'fb';
const ENGINE_TWITTER = 'twitter';
const ENGINE_VK = 'vk';
const ENGINE_OK = 'ok';
const ENGINE_LINKEDIN = 'linkedin';
const ENGINE_INSTAGRAM = 'instagram';