Skip to content

Commit

Permalink
Fix up getSmileyCode()
Browse files Browse the repository at this point in the history
  • Loading branch information
Frenzie committed Apr 7, 2016
1 parent b29ccc6 commit e7e05d8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions quickQuote.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,11 @@ function initializeQuickQuote() {
/*
* getSmileyCode() - returns smiley code
*/
function getSmileyCode(img){
if (!img.src.match(/^http:\/\/thedndsanctuary\.eu\/Smileys\/(default|myopera)\/(\w+)\.gif$/))
function getSmileyCode(img) {
var re = '^' + location.protocol + '\/\/' + location.hostname + '.+' + '\/smileys\/\\w+\/(\\w+)\\.gif$';
re = re.replace(/\//g, '\\/')
re = new RegExp(re);
if (!img.src.match(re))
return ''; // Event not spawned by a forum smiley (else match smiley name below)

else {
Expand Down

0 comments on commit e7e05d8

Please sign in to comment.