{"size": 3571, "ext": "js", "max_stars_repo_path": "assets/BOB/Scripts/Easy-Links-Script.js", "max_stars_repo_name": "BOBDevStudioTesting/Minimal-Mistakes-Fork-Theme", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "assets/BOB/Scripts/Easy-Links-Script.js", "max_issues_repo_name": "BOBDevStudioTesting/Minimal-Mistakes-Fork-Theme", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "assets/BOB/Scripts/Easy-Links-Script.js", "max_forks_repo_name": "BOBDevStudioTesting/Minimal-Mistakes-Fork-Theme", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 47.6133333333, "max_line_length": 189, "alphanum_fraction": 0.6998039765}
---
layout: none
permalink: /Assets/Scripts/Easy-Links-Script.js
---

var PagesKey = {
	{%- for page in site.pages -%}
	{%- if page.easy_links and page.easy_links.list and page.easy_links.search and page.easy_links.search.page_type -%}
	{%- for easylinkdata in page.easy_links.list -%}
	{%- if easylinkdata.search and easylinkdata.search.name and easylinkdata.link_name and easylinkdata.added_url_info -%}
	["{{ page.easy_links.search.page_type | markdownify | strip_html | strip_newlines | downcase }} / {{ easylinkdata.search.name | markdownify | strip_html | strip_newlines | downcase }}"]: {
		Text: "{{ easylinkdata.link_name | markdownify | strip_html | strip_newlines }}",
		URL: "{{ page.url | remove: ".html" | append: easylinkdata.added_url_info }}",
	},
	{%- elsif easylinkdata.search and easylinkdata.search.name and easylinkdata.link_name -%}
	["{{ page.easy_links.search.page_type | markdownify | strip_html | strip_newlines | downcase }} / {{ easylinkdata.search.name | markdownify | strip_html | strip_newlines | downcase }}"]: {
		Text: "{{ easylinkdata.link_name | markdownify | strip_html | strip_newlines }}",
		URL: "{{ page.url | remove: ".html" }}",
	},
	{%- endif -%}
	{%- endfor -%}
	{%- endif -%}
	{%- endfor -%}
	{%- for page in site.posts -%}
	{%- if page.easy_links and page.easy_links.list and page.easy_links.search and page.easy_links.search.page_type -%}
	{%- for easylinkdata in page.easy_links.list -%}
	{%- if easylinkdata.search and easylinkdata.search.name and easylinkdata.link_name and easylinkdata.added_url_info -%}
	["{{ page.easy_links.search.page_type | markdownify | strip_html | strip_newlines | downcase }} / {{ easylinkdata.search.name | markdownify | strip_html | strip_newlines | downcase }}"]: {
		Text: "{{ easylinkdata.link_name | markdownify | strip_html | strip_newlines }}",
		URL: "{{ page.url | remove: ".html" | append: easylinkdata.added_url_info }}",
	},
	{%- elsif easylinkdata.search and easylinkdata.search.name and easylinkdata.link_name -%}
	["{{ page.easy_links.search.page_type | markdownify | strip_html | strip_newlines | downcase }} / {{ easylinkdata.search.name | markdownify | strip_html | strip_newlines | downcase }}"]: {
		Text: "{{ easylinkdata.link_name | markdownify | strip_html | strip_newlines }}",
		URL: "{{ page.url | remove: ".html" }}",
	},
	{%- endif -%}
	{%- endfor -%}
	{%- endif -%}
	{%- endfor -%}
}
function AddEasyLinks(RootElement) {
	for (;;) {
		let DidFindOne = false
		let CodeElements = RootElement.getElementsByTagName("code")
		if (CodeElements.length >= 1) {
			for (let Position = 0; Position < CodeElements.length; Position++) {
				let CodeElement = CodeElements[Position]
				if (typeof PagesKey[CodeElement.innerHTML.toLowerCase()] === "object") {
					let PageData = PagesKey[CodeElement.innerHTML.toLowerCase()]
					let LinkNameText = PageData.Text
					if (typeof CodeElement.getAttribute("text") === "string") {
						LinkNameText = CodeElement.getAttribute("text")
					}
					CodeElement.outerHTML = "<a href=\"" + PageData.URL + "\">" + LinkNameText + "</a>"
					DidFindOne = true
					break
				}
			}
		}
		if (DidFindOne != true) {
			break
		}
	}
}
var PageContentElements = document.body.getElementsByClassName("page__content")
if (PageContentElements.length >= 1) {
	var PageContentElement = PageContentElements[0]
	AddEasyLinks(PageContentElement)
}
var PageFooterElements = document.body.getElementsByClassName("page-footer")
if (PageFooterElements.length >= 1) {
	var PageFooterElement = PageFooterElements[0]
	AddEasyLinks(PageFooterElement)
}