<commit_before>AutoMenu.js
===

Purpose
---
AutoMenu.js was created for the <a href="http://onnexions.org/SevenNews">Seven News Project</a> at <a href="http://connexions.org">Connexions.org</a>.  A need was identified to centralize the HTML and CSS of global menus to quickly apply changes to all web pages.  For Connexions.org this is a great savings because the slimmer web pages also reduce resource consumption when generating, deploying and backing up web pages.

Although the app was initially designed for menus, it will work with any HTML and CSS content.  For example, the page footers of the <a href="http://onnexions.org/SevenNews">Seven News Project</a> are loaded with this app.

How It Works
---
1. When an HTML document is opened, an iframe is created to download a specific HTML file from the server.  The iframe is dynamically created and destroyed.  The file downloaded is the template.
2. An HTML control is extracted from the template and inserted into the HTML document.  A customized load function specifies the control IDs and template filename.  The custom at this point is to use the template filename for all IDs.
3. The HTML control may contain a STYLE section and other HTML controls.  At the time of this writing, Javascript is automatically removed by all browsers tested.
4. HTML5 codes is used; no external libraries are required.  


Requirements
---
1. expect autoMenu home folder on webserver root:  
	http://connexions.org/autoMenu/

2. expect folder to contain HTML menu templates:  
	http://connexions.org/autoMenu/Templates

3. customized autoMenu.js to load required HTML templates, example:  
	http://connexions.org/autoMenu/7AutoMenu.js


Procedure
---
Note, this procedure is for the Seven News project (and Connexions.org).  Others will have to create an HTML template and a customized autoMenu.js.

1. Insert into HEAD section of HTML document:  <commit_msg>Fixed typo in link to Seven News<commit_after>AutoMenu.js
===

Purpose
---
AutoMenu.js was created for the <a href="http://connexions.org/SevenNews">Seven News Project</a> at <a href="http://connexions.org">Connexions.org</a>.  A need was identified to centralize the HTML and CSS of global menus to quickly apply changes to all web pages.  For Connexions.org this is a great savings because the slimmer web pages also reduce resource consumption when generating, deploying and backing up web pages.

Although the app was initially designed for menus, it will work with any HTML and CSS content.  For example, the page footers of the <a href="http://connexions.org/SevenNews">Seven News Project</a> are loaded with this app.

How It Works
---
1. When an HTML document is opened, an iframe is created to download a specific HTML file from the server.  The iframe is dynamically created and destroyed.  The file downloaded is the template.
2. An HTML control is extracted from the template and inserted into the HTML document.  A customized load function specifies the control IDs and template filename.  The custom at this point is to use the template filename for all IDs.
3. The HTML control may contain a STYLE section and other HTML controls.  At the time of this writing, Javascript is automatically removed by all browsers tested.
4. HTML5 codes is used; no external libraries are required.  


Requirements
---
1. expect autoMenu home folder on webserver root:  
	http://connexions.org/autoMenu/

2. expect folder to contain HTML menu templates:  
	http://connexions.org/autoMenu/Templates

3. customized autoMenu.js to load required HTML templates, example:  
	http://connexions.org/autoMenu/7AutoMenu.js


Procedure
---
Note, this procedure is for the Seven News project (and Connexions.org).  Others will have to create an HTML template and a customized autoMenu.js.

1. Insert into HEAD section of HTML document:  
{'fraction_non_alphanumeric': 0.06271230729030572, 'fraction_numerical': 0.005226025607525477, 'mean_word_length': 4.056803170409511, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4950080', 'n_tokens_mistral': 1028, 'n_tokens_neox': 975, 'n_words': 538}