PageSourceSearch

https://www.andrian.info/wp-content/plugins/sitepress-multilingual…/legacy-dropdown/script.js

js andrian.info collected 2026-10-02 20:57:12 UTC 702 bytes, 35 lines download raw bytes

1/*jshint browser:true, devel:true */
2/*global document */
3
4var WPMLLanguageSwitcherDropdown = (function() {
5	"use strict";
6
7	var toggleSelector = '.js-wpml-ls-legacy-dropdown a.js-wpml-ls-item-toggle';
8
9	var preventDefault = function(e) {
10		var evt = e ? e : window.event;
11
12		if (evt.preventDefault) {
13			evt.preventDefault();
14		}
15
16		evt.returnValue = false;
17	};
18
19	var init = function() {
20		var links = document.querySelectorAll(toggleSelector);
21		for(var i=0; i < links.length; i++) {
22			links[i].addEventListener('click', preventDefault );
23		}
24	};
25
26	return {
27		'init': init
28	};
29
30})();
31
32document.addEventListener('DOMContentLoaded', function(){
33	"use strict";
34	WPMLLanguageSwitcherDropdown.init();
35});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.