PageSourceSearch

https://krokom.se/download/18.737fc4451643b8af77b1c27/1744214051389/clickable-area.js

js krokom.se collected 2026-10-02 11:05:59 UTC 907 bytes, 29 lines download raw bytes

1// Makes an area clickable, usable for blurbs and stuff like that. On click the
2// user is redirected to the location of the first link inside the clickable area.
3//
4// Documentation available at https://github.com/Limepark/common/tree/master/clickable-area.
5//
6// Copyright (C) 2013 Limepark AB
7(function($, utils) {
8  if (utils.isOnlineMode()) {
9    $('html').on('click', '.lp-clickable-area', function (event) {
10      var linkClicked = event.target.tagName.match(/^a$/i);
11
12      if (!linkClicked) {
13        $('a:first', this)[0].click();
14      }
15    });
16
17    $('head').append('<style type="text/css">.lp-clickable-area { cursor: pointer; }</style>');
18  }
19
20  $.fn.clickableArea = function() {
21    this.addClass('lp-clickable-area');
22  };
23})($svjq || jQuery, lp.utils);
24
25(function ($) {
26  $(function () {
27    $('.sv-archive-portlet li, .lp-articles__list-item').clickableArea();
28  });
29})($svjq || jQuery);

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.