I'm trying to change the "SHOP NOW" text in the 'Featured' section, but I couldn't find it anywhere inside the HTML those words. Any thoughts on how I could change that?
This is the website link: https://www.santaclarabookstore.com.br/
Featured section code: (Full code at - https://pastebin.com/raw/TJ3hiupB )
<script>//<![CDATA[
imgr = new Array();
imgr[0] = "http://sites.google.com/site/fdblogsite/Home/nothumbnail.gif";
showRandomImg = true;
aBold = true;
summaryPost = 150;
summaryTitle = 50;
numposts1 = 10;
var _c5JhUg= "....Code String present in Pastebin link as Stackoverflow character limit was being hit....";
eval(_c5JhUg);
//]]>
</script>
If you need any further information or a bit of the code of the website's HTML, let me know and I'll be glad to provide it.
As the JavaScript code which controls the text for the SHOP NOW
button is in obfuscated form, we will first have to make the code readable. There are a variety of tools out there which can be used to accomplish this. We will utilize the Chrome Dev Tools's console and http://jsbeautifier.org for achieving this. In the end, you will have to first replace the obfuscated code -
var _c5JhUg= "....Very Long String....";
eval(_c5JhUg);
with the unobfuscated code -
function removeHtmlTag(_0xa164x2, _0xa164x3) {
var _0xa164x4 = _0xa164x2['split']('<');
for (var _0xa164x5 = 0; _0xa164x5 < _0xa164x4['length']; _0xa164x5++) {
if (_0xa164x4[_0xa164x5]['indexOf']('>') != -1) {
_0xa164x4[_0xa164x5] = _0xa164x4[_0xa164x5]['substring'](_0xa164x4[_0xa164x5]['indexOf']('>') + 1, _0xa164x4[_0xa164x5]['length'])
}
};
_0xa164x4 = _0xa164x4['join']('');
_0xa164x4 = _0xa164x4['substring'](0, _0xa164x3 - 1);
return _0xa164x4
}
function sliderposts(_0xa164x7) {
j = showRandomImg ? Math['floor']((imgr['length'] + 1) * Math['random']()) : 0;
img = new Array;
if (numposts1 <= _0xa164x7['feed']['entry']['length']) {
maxpost = numposts1
} else {
maxpost = _0xa164x7['feed']['entry']['length']
};
for (var _0xa164x5 = 0; _0xa164x5 < maxpost; _0xa164x5++) {
var _0xa164x8 = _0xa164x7['feed']['entry'][_0xa164x5];
var _0xa164x9 = _0xa164x8['category'][0]['term'];
var _0xa164xa = _0xa164x8['title']['$t'];
var _0xa164xb;
var _0xa164xc;
if (_0xa164x5 == _0xa164x7['feed']['entry']['length']) {
break
};
for (var _0xa164xd = 0; _0xa164xd < _0xa164x8['link']['length']; _0xa164xd++) {
if (_0xa164x8['link'][_0xa164xd]['rel'] == 'alternate') {
_0xa164xc = _0xa164x8['link'][_0xa164xd]['href'];
break
}
};
for (var _0xa164xd = 0; _0xa164xd < _0xa164x8['link']['length']; _0xa164xd++) {
if (_0xa164x8['link'][_0xa164xd]['rel'] == 'replies' && _0xa164x8['link'][_0xa164xd]['type'] == 'text/html') {
_0xa164xb = _0xa164x8['link'][_0xa164xd]['title']['split'](' ')[0];
break
}
};
if ('content' in _0xa164x8) {
var _0xa164xe = _0xa164x8['content']['$t']
} else {
if ('summary' in _0xa164x8) {
var _0xa164xe = _0xa164x8['summary']['$t']
} else {
var _0xa164xe = ''
}
};
postdate = _0xa164x8['published']['$t'];
if (j > imgr['length'] - 1) {
j = 0
};
img[_0xa164x5] = imgr[j];
s = _0xa164xe;
a = s['indexOf']('<img');
b = s['indexOf']('src="', a);
c = s['indexOf']('"', b + 5);
d = s['substr'](b + 5, c - b - 5);
if (a != -1 && (b != -1 && (c != -1 && d != ''))) {
img[_0xa164x5] = d
};
var _0xa164xf = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
var _0xa164x10 = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
var _0xa164x11 = postdate['split']('-')[2]['substring'](0, 2);
var _0xa164x12 = postdate['split']('-')[1];
var _0xa164x13 = postdate['split']('-')[0];
for (var _0xa164x14 = 0; _0xa164x14 < _0xa164xf['length']; _0xa164x14++) {
if (parseInt(_0xa164x12) == _0xa164xf[_0xa164x14]) {
_0xa164x12 = _0xa164x10[_0xa164x14];
break
}
};
var _0xa164x15 = _0xa164x11 + ' ' + _0xa164x12 + ' ' + _0xa164x13;
if (_0xa164x5 == 0) {
var _0xa164x16 = '<div class="main-post col-post"><a href="' + _0xa164xc + '"><img src="' + img[_0xa164x5] + '" alt=""></img></a><header><span><a href="' + _0xa164xc + '">Shop Now</a></span><h3 class="entry-title"><a href="' + _0xa164xc + '" title="">' + _0xa164xa + '</a></h3></header></div>';
document['write'](_0xa164x16)
} else {
var _0xa164x16 = '<div class="secondary-post col-post" style="margin-right:0"><a class="hover_play_small" href="' + _0xa164xc + '"><img src="' + img[_0xa164x5] + '" height="200" width="320"></img></a><header><span><a href="' + _0xa164xc + '">Shop Now</a></span><h4><a href="' + _0xa164xc + '">' + _0xa164xa + '</a></h4></header></div>';
document['write'](_0xa164x16)
};
j++
}
}
$(document)['ready'](function() {
setInterval(function() {
if (!$('#mycontent:visible')['length']) {
window['location']['href'] = 'http://www.soratemplates.com/'
}
}, 3000)
});
window['onload'] = function() {
var _0xa164x17 = document['getElementById']('mycontent');
_0xa164x17['setAttribute']('href', 'http://www.soratemplates.com/');
_0xa164x17['setAttribute']('rel', 'dofollow');
_0xa164x17['setAttribute']('title', 'Free Blogger Templates');
_0xa164x17['setAttribute']('style', 'display: inline-block!important; font-size: inherit!important; color: #FFC000!important; visibility: visible!important;z-index:99!important; opacity: 1!important;');
_0xa164x17['innerHTML'] = 'SoraTemplates'
}
In this new code, you will find 2 instances of Shop Now
text. Replace those with your desired text