mirror of
https://github.com/Investigamer/cardconjurer.git
synced 2025-07-27 05:14:53 -05:00
Update creator-10.js
This commit is contained in:
@@ -873,7 +873,7 @@ function widthToAngle(width, radius) {
|
|||||||
return width / radius;
|
return width / radius;
|
||||||
}
|
}
|
||||||
function curlyQuotes(input) {
|
function curlyQuotes(input) {
|
||||||
return input.replace(/ '/g, ' ‘').replace(/^'/, '‘').replace(/' /g, '’ ').replace(/'$/, '’').replace(/ "/g, ' “').replace(/^"/, '“').replace(/" /g, '” ').replace(/"$/, '”');
|
return input.replace(/ '/g, ' ‘').replace(/^'/, '‘').replace(/' /g, '’ ').replace(/'$/, '’').replace(/ "/g, ' “').replace(/^"/, '“').replace(/" /g, '” ').replace(/\."/, '”').replace(/"$/, '”');
|
||||||
}
|
}
|
||||||
//ART TAB
|
//ART TAB
|
||||||
function uploadArt(imageSource, otherParams) {
|
function uploadArt(imageSource, otherParams) {
|
||||||
@@ -1130,16 +1130,7 @@ function changeCardIndex() {
|
|||||||
if (card.text.mana) {card.text.mana.text = cardToImport.mana_cost || '';}
|
if (card.text.mana) {card.text.mana.text = cardToImport.mana_cost || '';}
|
||||||
if (card.text.type) {card.text.type.text = cardToImport.type_line || '';}
|
if (card.text.type) {card.text.type.text = cardToImport.type_line || '';}
|
||||||
if (card.text.rules) {
|
if (card.text.rules) {
|
||||||
var rulesText = (cardToImport.oracle_text || '').replace('(', '{i}(').replace(')', '){/i}');
|
var rulesText = curlyQuotes((cardToImport.oracle_text || '').replace('(', '{i}(').replace(')', '){/i}'));
|
||||||
var rulesTextCounter = 1;
|
|
||||||
while (rulesText.includes('"')) {
|
|
||||||
if (rulesTextCounter % 2) {
|
|
||||||
rulesText = rulesText.replace('"', '\u201c');
|
|
||||||
} else {
|
|
||||||
rulesText = rulesText.replace('"', '\u201d');
|
|
||||||
}
|
|
||||||
rulesTextCounter ++;
|
|
||||||
}
|
|
||||||
card.text.rules.text = rulesText;
|
card.text.rules.text = rulesText;
|
||||||
if (cardToImport.flavor_text) {
|
if (cardToImport.flavor_text) {
|
||||||
var flavorText = cardToImport.flavor_text;
|
var flavorText = cardToImport.flavor_text;
|
||||||
|
Reference in New Issue
Block a user