PageSourceSearch

https://www.iaeaixalumni.org/js/mevia/modules/menu/switchlanguages.js?version=1790249448

js iaeaixalumni.org collected 2026-09-25 08:19:00 UTC 1,056 bytes, 33 lines download raw bytes

1$(document).ready(function () {
2  var languages = ['en', 'es', 'de', 'fr', 'hu', 'nl'];
3  var customTag;
4  var i;
5  var reload = function (lang) {
6    return function () {
7      var currentHref = window.location.href;
8      // Replace the /<language> prefix if present in the URL
9      var replace = new RegExp('^(https?://[^/]+/)(' + languages.join('|') + ')(/|$)');
10      var newHref = currentHref.replace(replace, '$1' + lang + '$3');
11
12      if (newHref === currentHref) {
13        window.location.reload();
14      } else {
15        window.location.assign(newHref);
16      }
17    };
18  };
19
20  $('.userbar-menu-item-language').removeClass('userbar-not-loaded');
21
22  for (i = 0; i < languages.length; i += 1) {
23    customTag = getCustomTag('langswitch_' + languages[i] + '_close');
24    if (customTag !== undefined) {
25      customTag.request.setOnSuccess(reload(languages[i]));
26    }
27
28    customTag = getCustomTag('langswitch_' + languages[i] + '_open');
29    if (customTag !== undefined) {
30      customTag.request.setOnSuccess(reload(languages[i]));
31    }
32  }
33});

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.