PageSourceSearch

https://www.redditchbc.gov.uk/scripts/social.share.js

js redditchbc.gov.uk collected 2026-10-02 08:47:35 UTC 1,492 bytes, 38 lines download raw bytes

1window.onload = setShareLinks;
2
3function setShareLinks() {
4    var pageUrl = encodeURIComponent(document.URL);
5    var description = document.querySelector("meta[name='description']").getAttribute("content");
6    var description = encodeURIComponent(description);
7
8    elements = document.querySelectorAll(".social-share.facebook");
9    Array.prototype.forEach.call(elements, function(el) {
10        el.addEventListener("click", function() {
11            url = "https://www.facebook.com/sharer.php?u=" + pageUrl;
12            socialWindow(url);
13        });
14    });
15
16    elements = document.querySelectorAll(".social-share.twitter");
17    Array.prototype.forEach.call(elements, function(el) {
18        el.addEventListener("click", function() {
19            url = "https://twitter.com/intent/tweet?url=" + pageUrl + "&text=" + description;
20            socialWindow(url);
21        });
22    });
23
24    elements = document.querySelectorAll(".social-share.linkedin");
25    Array.prototype.forEach.call(elements, function(el) {
26        el.addEventListener("click", function() {
27            url = "https://www.linkedin.com/shareArticle?mini=true&url=" + pageUrl;
28            socialWindow(url);
29        });
30    });
31};
32
33function socialWindow(url) {
34    var left = (screen.width - 570) / 2;
35    var top = (screen.height - 570) / 2;
36    var params = "menubar=no,toolbar=no,status=no,width=570,height=570,top=" + top + ",left=" + left;
37    window.open(url,"NewWindow",params);
38};

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.