PageSourceSearch

https://liberty-unleashed.co.uk/pinning.js

js liberty-unleashed.co.uk collected 2026-10-01 16:18:06 UTC 9,257 bytes, 177 lines download raw bytes

1var ____prototype_ae_IE9JumpList = ____prototype_ae_IE9JumpList || {};
2
3(function( jumplist ) {
4	if ( !navigator.userAgent.toLowerCase().match(/msie (9|10)(\.?[0-9]*)*/) ) {
5		return;
6	}
7	
8	var options = {
9
10		// Basic site information	
11		siteName: 'Liberty Unleashed', // Site Name
12		applicationName: 'Liberty Unleashed', // Site Name 
13		startURL: '', // Homepage URL 
14		shortcutIcon: 'http://liberty-unleashed.co.uk/favicon.ico', // Main Site Icon
15		tooltip: '',
16
17		// Dynamic jumplist tasks & notifications
18		rssFeedURL: 'http://www.buildmypinnedsite.com/RSSFeed?feed=http%3a//forum.liberty-unleashed.co.uk/index.php?type=rss;action=.xml',
19		categoryTitle: 'Latest Forum Posts', // Task group name
20		defaultTaskIcon: 'http://liberty-unleashed.co.uk/favicon.ico', // Generic task icon
21		
22		navButtonColor: false,
23		
24		// Jumplist tasks { name: Task Label, action: Task URL, icon: Task Icon }
25		staticTasks: [{ name: 'Forum',  action: 'http%3a//forum.liberty-unleashed.co.uk/', icon: 'http://liberty-unleashed.co.uk/favicon.ico', target: 'tab' },{ name: 'Wiki',  action: 'http%3a//liberty-unleashed.co.uk/LUWiki', icon: 'http://liberty-unleashed.co.uk/favicon.ico', target: 'tab' },{ name: 'Downloads',  action: 'http%3a//liberty-unleashed.co.uk/index.php?p=downloads', icon: 'http://liberty-unleashed.co.uk/favicon.ico', target: 'tab' },{ name: 'Updates',  action: 'http%3a//liberty-unleashed.co.uk/index.php?p=update', icon: 'http://liberty-unleashed.co.uk/favicon.ico', target: 'tab' }],
26		
27		// Drag and drop site pinning bar		
28		prompt: true, // Add a site pinning bar on top of my site pages
29		barSiteName: 'Liberty Unleashed' // Site name as it should appear on the pinning bar
30	};
31	
32	var lib = {
33		dom: {
34			meta: function(name, content) {
35				var meta = document.createElement('meta');
36				meta.setAttribute('name', name);
37				meta.setAttribute('content', content);		
38				return meta;
39			},
40			link: function(rel, href) {
41				var link = document.createElement('link');
42				link.setAttribute('rel', rel);
43				link.setAttribute('href', href);
44				return link;
45			},
46			div: function() {
47				return document.createElement('div');
48			}
49		},
50		net: {
51			getJSONP: function( URL ) {
52				var script = document.createElement('script');
53				script.type = 'text/javascript';
54				script.src = URL + ( URL.indexOf('?') != -1 ? '&' : '?' ) + Date.now();
55				var head = document.getElementsByTagName('head')[0];
56				head.insertBefore(script, head.firstChild);
57			}
58		}
59	};
60	
61	jumplist.parseRSSFeed = function parseRSSFeed( news ) {
62		try {
63			if ( window.external.msIsSiteMode() ) {
64				window.external.msSiteModeClearJumpList();
65				window.external.msSiteModeCreateJumpList( options.categoryTitle );
66				
67				try {
68					// RSS feeds
69					if ( news.rss && news.rss.channel && news.rss.channel.item ) {
70						for ( var items = news.rss.channel.item.slice(0, 10), numItems = items.length, i = numItems-1, task, pubDate, taskTitle = ''; i >= 0; i-- ) {
71							task = items[i];
72							pubDate = Date.parse( task.pubDate );
73							taskTitle = task.title ? ( typeof task.title == 'string' ? task.title : task.title['#cdata-section'] || '' ) : '';
74							window.external.msSiteModeAddJumpListItem( taskTitle, task.link, decodeURIComponent(options.defaultTaskIcon) );
75						}
76					} else if ( news.feed && news.feed.entry ) { // Atom feeds
77						for ( var items = news.feed.entry.slice(0, 10), numItems = items.length, i = numItems-1, task, pubDate, taskTitle = '', link = {}; i >= 0; i-- ) {
78							task = items[i];
79							pubDate = Date.parse( task.published );
80							taskTitle = task.title ? ( typeof task.title == 'string' ? task.title : (task.title['#cdata-section'] ? task.title['#cdata-section'] : task.title['#text'] || '')) : '';
81
82							if ( task.link ) {
83								if ( typeof task.link == 'string') {
84									link['@href'] = task.link || '#';
85								} else if ( Object.prototype.toString.call( task.link ) === '[object Array]') {
86									link = task.link[0];
87								} else {
88									link = task.link;
89								}
90							}
91
92							window.external.msSiteModeAddJumpListItem( taskTitle, link['@href'] || '#', decodeURIComponent(options.defaultTaskIcon) );
93						
94						}
95					}
96
97				} catch ( ex ) {			
98				}
99
100				window.external.msSiteModeShowJumpList();
101			} else {
102			}
103		}
104		catch ( ex ) {
105		}
106	}
107	
108	// Init code
109	document.addEventListener('DOMContentLoaded', function() {
110		
111		try { 
112			document.getElementsByTagName('body')[0].onfocus = function() {
113				window.external.msSiteModeClearIconOverlay();
114			};
115		} catch(err) {
116		}
117		
118		var head = document.getElementsByTagName('head');
119		
120		if ( !head ) {
121			return;
122		}
123		
124		head = head[0];
125		
126		var links = document.getElementsByTagName('link'), remove = [];
127		
128		for ( var i = 0, rel; i < links.length; i++ ) {
129			rel = links[i].getAttribute('rel');
130			if ( !rel ) {
131				continue;
132			}
133			rel = rel.toLowerCase().replace(/^\s+|\s+$/g, '').replace(/\s+/g, ' ');
134			if ( rel == 'icon' || rel == 'shortcut icon' ) {
135				remove.push( links[i] );
136			}
137		}
138		
139		for ( i = 0; i < remove.length; i++ ) {
140			head.removeChild( remove[i] );
141		}
142		
143		if ( options.shortcutIcon ) {
144			head.appendChild( lib.dom.link('shortcut icon', decodeURIComponent(options.shortcutIcon)) );
145		}
146		
147		head.appendChild( lib.dom.meta('application-name', options.applicationName) );
148		head.appendChild( lib.dom.meta('msapplication-tooltip', options.tooltip) );
149		
150		if ( options.navButtonColor ) {
151			head.appendChild( lib.dom.meta('msapplication-navbutton-color', options.navButtonColor) );
152		}
153		
154		if ( options.startURL ) {
155			head.appendChild( lib.dom.meta('msapplication-starturl', decodeURIComponent(options.startURL)) );
156		}
157	
158		for ( var i = 0, task; i < options.staticTasks.length; i++ ) {
159			task = options.staticTasks[i];
160			head.appendChild( lib.dom.meta('msapplication-task', 'name=' + task.name + ';action-uri=' + decodeURIComponent(task.action) + ';icon-uri=' + decodeURIComponent(task.icon) + ';window-type=' + task.target ) );
161		}
162		if ( options.prompt && !window.external.msIsSiteMode() && sessionStorage.getItem('hideIE9SitePinningBar') != '1' ) {
163			var bar = lib.dom.div();
164			var barHTML = '<div style="border: 1px solid #E1E1E1; padding: 5px 9px 2px 9px; background: #fff url(http://www.buildmypinnedsite.com/PinImages/Bar/bar-background.png) repeat-x scroll 0 100%;"><table cellspacing="0" cellpadding="0" style="width: 100%; border: 0 none; border-collapse: collapse;"><tbody><tr><td><div style="background: transparent url(' + decodeURIComponent(options.shortcutIcon.replace(/\.ico$/, ".png")) + ') no-repeat scroll 0 3px; background-size: 20px 20px; width: 260px; padding-left: 26px; min-height: 30px; font-weight: bold; font-size:14px;">Experience ' + (options.barSiteName || options.siteName) + '  as a Pinned Site</div></td><td><div style="display: inline-block;padding-right: 40px; position: relative;text-align: right;"><strong style="font-weight: bold; font-size: 18px;">Drag this icon to your taskbar <img src="http://www.buildmypinnedsite.com/PinImages/Bar/arrow-icon.png" /></strong><div style="color:#797c85; font-size: 12px;">or, <a href="#" onclick="window.external.msAddSiteMode(); return false" style="color: #6CABBA; text-decoration: underline;">click here</a> to add this site to your start menu </div><div style="position: absolute; right:-120px; top: -13px; width: 164px; height: 143px; background: transparent url(http://www.buildmypinnedsite.com/PinImages/Bar/drag-icon-placeholder.png) no-repeat scroll 0 0;"><img class="msPinSite" style="position: absolute; top:17px; left:16px;cursor: move; width: 32px; height: 32px;" src="' + decodeURIComponent(options.shortcutIcon.replace(/\.ico$/, ".png")) + '" /></div></div></td><td><div style="position: relative; float: right; width: 80px; min-height: 30px; padding-left: 23px; padding-right: 30px; background: transparent url(http://www.buildmypinnedsite.com/PinImages/Bar/info-icon.png) no-repeat scroll 0 6px;"><a style="font-size: 12px; color: #6CABBA; text-decoration: underline;" href="http://www.beautyoftheweb.com/#/productguide/clean/seamless-with-windows-7" target="_blank">Learn about Site Pinning</a><div onclick="document.getElementById(\'___ie9sitepinning__bar_container\').style.display=\'none\';window.sessionStorage.setItem(\'hideIE9SitePinningBar\', \'1\')" style="background: transparent url(http://www.buildmypinnedsite.com/PinImages/Bar/close-button.png) no-repeat scroll 0 0;position: absolute;top: 0; right: 0;display: block; width: 18px; height: 18px; cursor: pointer; float: right;"></div></div></td></tbody></table></div>';
165			bar.setAttribute('style', "position: absolute; top: 0; left: 20px; width: 95%; margin:0; padding:0; border: 0 none; border-bottom:1px solid #707070; color: #1c1f26; background: transparent none no-repeat scroll 0 0; font-family: 'Segoe UI', Arial, tahoma, sans-serif; line-height: 18px; box-shadow: 0 1px 5px rgba(140,140,140,0.7);");
166			bar.id = '___ie9sitepinning__bar_container';
167			bar.innerHTML = barHTML;
168			document.getElementsByTagName('body')[0].appendChild( bar );
169		}
170		
171		jumplist.poll = function() {
172			lib.net.getJSONP( decodeURIComponent(options.rssFeedURL), jumplist.parseRSSFeed );
173		};
174		
175		window.setTimeout( jumplist.poll, 30 );
176	});
177})( ____prototype_ae_IE9JumpList );

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.