Skip to content
This repository was archived by the owner on Jun 28, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/PageView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const PageView = ({ lines, keys, currentVerse, options, isPlaying, audioActions,
const nextNum = keys[index + 1];
const pageNum = lineNum.split('-')[0];
const line = lines[lineNum];
const renderText = userAgent.isChrome || userAgent.isOpera || userAgent.isBot;
const renderText = userAgent.isBot;

if (index + 1 !== keys.length && pageNum !== nextNum.split('-')[0]) {
return [
Expand Down
2 changes: 1 addition & 1 deletion src/components/Verse/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class Verse extends Component {
const { verse, tooltip, currentVerse, isPlaying, audioActions, isSearched, userAgent } = this.props; // eslint-disable-line max-len
// NOTE: Some 'word's are glyphs (jeem). Not words and should not be clicked for audio
let wordAudioPosition = -1;
const renderText = userAgent.isChrome || userAgent.isOpera || userAgent.isBot;
const renderText = userAgent.isBot;

const text = verse.words.map(word => ( // eslint-disable-line
<Word
Expand Down
14 changes: 8 additions & 6 deletions src/components/Word/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,17 @@ class Word extends Component {
let text;
let spacer;
const highlight = currentVerse === word.verseKey && isPlaying ? 'highlight' : '';
const className = `${useTextFont ? 'text-' : ''}${word.charType === CHAR_TYPE_WORD ? word.className : 'p0'} ${word.charType} ${highlight} ${word.highlight ? word.highlight : ''}`;
const className = `${useTextFont ? 'text-' : ''}${word.className} ${word.charType} ${highlight} ${word.highlight ? word.highlight : ''}`;
const id = `word-${word.verseKey.replace(/:/, '-')}-${audioPosition}`;

if (word.charType === CHAR_TYPE_END) {
text = zeroPad(word.verseKey.split(':')[1], 3, 0);
} else if (!useTextFont || word.charType === CHAR_TYPE_PAUSE) {
text = word.codeV3;
if (useTextFont) {
if (word.charType === CHAR_TYPE_END) {
text = zeroPad(word.verseKey.split(':')[1], 3, 0);
} else {
text = word.textMadani;
}
} else {
text = word.textMadani;
text = word.code;
}

if (word.charType === CHAR_TYPE_WORD) {
Expand Down
2 changes: 1 addition & 1 deletion src/styles/fonts/_fonts.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@mixin word_font($page) {
@font-face {
font-family: p#{$page};
src: url('../../static/fonts/ttf/p#{$page}.ttf') format('truetype');
src: url('//quran-1f14.kxcdn.com/fonts/ttf/p#{$page}.ttf') format('truetype');
}

@font-face {
Expand Down