PageSourceSearch

https://kpr.vbglenobl.ru/core/modules/contextual/js/views/VisualView.js?v=9.5.3

js vbglenobl.ru collected 2026-10-02 06:42:51 UTC 1,657 bytes, 50 lines download raw bytes

1/**
2* DO NOT EDIT THIS FILE.
3* See the following change record for more information,
4* https://www.drupal.org/node/2815083
5* @preserve
6**/
7(function (Drupal, Backbone) {
8  Drupal.contextual.VisualView = Backbone.View.extend({
9    events: function events() {
10      var touchEndToClick = function touchEndToClick(event) {
11        event.preventDefault();
12        event.target.click();
13      };
14      var touchStart = false;
15      return {
16        touchstart: function touchstart() {
17          touchStart = true;
18        },
19        mouseenter: function mouseenter() {
20          if (!touchStart) {
21            this.model.focus();
22          }
23        },
24        mousemove: function mousemove() {
25          touchStart = false;
26        },
27        'click .trigger': function clickTrigger() {
28          this.model.toggleOpen();
29        },
30        'touchend .trigger': touchEndToClick,
31        'click .contextual-links a': function clickContextualLinksA() {
32          this.model.close().blur();
33        },
34        'touchend .contextual-links a': touchEndToClick
35      };
36    },
37    initialize: function initialize() {
38      this.listenTo(this.model, 'change', this.render);
39    },
40    render: function render() {
41      var isOpen = this.model.get('isOpen');
42      var isVisible = this.model.get('isLocked') || this.model.get('regionIsHovered') || isOpen;
43      this.$el.toggleClass('open', isOpen).find('.trigger').toggleClass('visually-hidden', !isVisible);
44      if ('isOpen' in this.model.changed) {
45        this.$el.closest('.contextual-region').find('.contextual .trigger:not(:first)').toggle(!isOpen);
46      }
47      return this;
48    }
49  });
50})(Drupal, Backbone);

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.