Commit e91ce8d4 authored by Dave Lane's avatar Dave Lane
Browse files

tweaking formatting and shifting WEnotesID values into header to fix issue of...

tweaking formatting and shifting WEnotesID values into header to fix issue of script tags not surviving in footer...
parent 003d7f67
......@@ -487,7 +487,7 @@ function processPage(pi) {
} else if (wrapper.hasClass('center')) {
align = 'center';
align_class = 'center';
}
}
console.log('align=' + align + ', align_class=' + align_class + '...');
wrapper.find('iframe').each(function(i, e) {
var $this = $(this);
......@@ -495,7 +495,7 @@ function processPage(pi) {
// get the number only
width = $this.attr('width').replace(numstr, '') || 560,
// get the units, if any
w_unit = $this.attr('width').replace(width, '') || 'px',
w_unit = $this.attr('width').replace(width, '') || 'px',
// get the number only
height = $this.attr("height").replace(numstr, '') || 315,
// get the units, if any
......@@ -540,7 +540,7 @@ function processPage(pi) {
} else {
align = 'none';
}
//console.log('align ', align);
//console.log('align ', align);
// get the title if any
if (wrapper.find('.weYouTubeTitleContainer')) {
yttitle = wrapper.find('.weYouTubeTitleContainer').text();
......@@ -554,7 +554,7 @@ function processPage(pi) {
origheight = $this.css("height") || '315px',
start = 0,
list = $this.attr("data-list"),
index = $this.attr("data-index");
index = $this.attr("data-index");
// get the number only
width = origwidth.replace(numstr, '');
// get the units, if any
......@@ -577,14 +577,14 @@ function processPage(pi) {
start = qparam[1];
console.log('found start! = ', start);
}
}
}
console.log('qstring = ', qstring);
} else {
} else {
url = 'https://youtube.com/watch?v=' + id;
}
console.log('url = ', url);
console.log('url = ', url);
var opts = ' class="weYouTube-responsive" controls="yes" disable_links="true" allowfullscreen="yes"';
opts += ' url="' + url + '"';
opts += ' url="' + url + '"';
opts += ' maxwidth="' + width +'"';
if (start != 0) { opts += ' parameters="start=' + start + '"'; }
if (yttitle != "") { opts += ' title="' + yttitle + '"'; }
......@@ -839,7 +839,7 @@ function processPage(pi) {
var site_id = stringToHash(base_url);
var path_id = stringToHash(url);
console.log('|||||||||||| hashes: base_id = '+site_id+', path_id = '+path_id);
$('footer').append(`
$('header').append(`
<script id="wenotes-ids">
var WEnotesSite = '`+base_url+`';
var WEnotesPath = '`+url+`';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment