Skip to content

Commit

Permalink
Fix smiley & fix Opera/Presto
Browse files Browse the repository at this point in the history
  • Loading branch information
Frenzie committed Apr 13, 2016
1 parent 6773bdc commit 69e48ec
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions quickQuote.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,16 +263,14 @@ function initializeQuickQuote() {
* getSmileyCode() - returns smiley code
*/
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 {
if (img.alt && img.className && img.className === 'smiley') {
// Alternative text corresponds to smiley code.
return img.alt;
}
else {
// Event not spawned by a forum smiley (else match smiley name below)
return '';
}

/*
var smileyName = RegExp.$1;
Expand All @@ -295,7 +293,7 @@ function initializeQuickQuote() {
if (selection) {
var selectionAncestor = selection.commonAncestorContainer;
var selectionContents;
var postAncestor = selectionAncestor.selectSingleNode('ancestor-or-self::div[contains(@class,"post")]');
var postAncestor = selectionAncestor.selectSingleNode('ancestor-or-self::div[contains(@class,"inner")]');
setHiddenFlag(selectionAncestor);

if (selectionAncestor.nodeType != 3 && selectionAncestor.nodeType != 4)
Expand All @@ -318,7 +316,6 @@ function initializeQuickQuote() {
selectionContents = newSelectionContents;
}
}

var selectedText = trim(treeToBBCode(selectionContents));

//if( selectedText ){
Expand Down

0 comments on commit 69e48ec

Please # to comment.