Zum Inhalt der Seite gehen


@Friendica Developers@Hypolite Petovan
after moving Text_Highlighter to composer vendor directory the sample.css is missing. It was loaded in view/theme/templates/head.tpl and view/theme/frio/templates/head.tpl .
Is it really useful since it's a sample? My plan is to get rid of Text_Highlighter for something lighter that doesn't require PEAR. Ideally something in Javascript so that we don't generate complicated HTML that we have to skip to send to Diaspora for example.
Is it really useful since it's a sample?

Yes because it is for color highlighting. Otherwise we would need to write it by our own
function hallo($a, $test = true) {
 $var = t('test for colors through sample.css');
 return false

My plan is to get rid of Text_Highlighter for something lighter that doesn't require PEAR.
Good idea, because Text_Highlighter isn't maintained anymore.
But can we restore the original behavior until we have the replacement? Does mean including the sample.css.
Only if the JS is doing it's job also with LibrJS enabled ;-) Also remember the people who have JS disabled for Malware protection.
I didn't know LibreJS but it's worth checking if Highlight.js, the library I was eyeing, is compatible with.

Furthermore, syntax highlighting is just display sugar, I don't see an issue with it being absent if Javascript is disabled.
Also remember the people who have JS disabled for Malware protection.
The basic core function should also work without js. But on the other side we should make it possible to have good js implementations to have a comfortable modern GUI. The syntax highlighting e.g. is such a case. We shouldn't hardcode such stuff. It federates very bad with other networks and we are bound to a specific library and its way of generating html.
Ahh cool. I also wanted to change it but I haven't found the file sample.css. :-)
I'm interested in how you will solve the problem with new added content (e.g.infinite scrolling)
Either the highlighting script is automatically triggered for each DOM change, or we can manually trigger it in the /update callback.