diff --git a/docs/assets/screenshots/portal/apollo-news.png b/docs/assets/screenshots/portal/apollo-news.png index f843d81..8302b56 100644 Binary files a/docs/assets/screenshots/portal/apollo-news.png and b/docs/assets/screenshots/portal/apollo-news.png differ diff --git a/docs/assets/screenshots/portal/apollo-news_article1.png b/docs/assets/screenshots/portal/apollo-news_article1.png new file mode 100644 index 0000000..8447cca Binary files /dev/null and b/docs/assets/screenshots/portal/apollo-news_article1.png differ diff --git a/docs/assets/screenshots/portal/apollo-news_article2.png b/docs/assets/screenshots/portal/apollo-news_article2.png new file mode 100644 index 0000000..a636a52 Binary files /dev/null and b/docs/assets/screenshots/portal/apollo-news_article2.png differ diff --git a/docs/assets/screenshots/portal/bbc.png b/docs/assets/screenshots/portal/bbc.png deleted file mode 100644 index df11300..0000000 Binary files a/docs/assets/screenshots/portal/bbc.png and /dev/null differ diff --git a/docs/assets/screenshots/portal/heise.png b/docs/assets/screenshots/portal/heise.png deleted file mode 100644 index 18dd889..0000000 Binary files a/docs/assets/screenshots/portal/heise.png and /dev/null differ diff --git a/docs/assets/screenshots/portal/nypost.png b/docs/assets/screenshots/portal/nypost.png new file mode 100644 index 0000000..74bae13 Binary files /dev/null and b/docs/assets/screenshots/portal/nypost.png differ diff --git a/docs/assets/screenshots/portal/nypost_article1.png b/docs/assets/screenshots/portal/nypost_article1.png new file mode 100644 index 0000000..cfc2058 Binary files /dev/null and b/docs/assets/screenshots/portal/nypost_article1.png differ diff --git a/docs/assets/screenshots/portal/nypost_article2.png b/docs/assets/screenshots/portal/nypost_article2.png new file mode 100644 index 0000000..9eabe97 Binary files /dev/null and b/docs/assets/screenshots/portal/nypost_article2.png differ diff --git a/docs/assets/screenshots/portal/nypost_context.png b/docs/assets/screenshots/portal/nypost_context.png new file mode 100644 index 0000000..82663aa Binary files /dev/null and b/docs/assets/screenshots/portal/nypost_context.png differ diff --git a/docs/assets/screenshots/portal/nypost_lifecycle.png b/docs/assets/screenshots/portal/nypost_lifecycle.png new file mode 100644 index 0000000..589615c Binary files /dev/null and b/docs/assets/screenshots/portal/nypost_lifecycle.png differ diff --git a/docs/assets/screenshots/portal/nypost_tag_cloud.png b/docs/assets/screenshots/portal/nypost_tag_cloud.png new file mode 100644 index 0000000..2a0aa41 Binary files /dev/null and b/docs/assets/screenshots/portal/nypost_tag_cloud.png differ diff --git a/docs/assets/screenshots/portal/nypost_vs_washington_post.png b/docs/assets/screenshots/portal/nypost_vs_washington_post.png new file mode 100644 index 0000000..d735c85 Binary files /dev/null and b/docs/assets/screenshots/portal/nypost_vs_washington_post.png differ diff --git a/docs/assets/screenshots/portal/nytimes.png b/docs/assets/screenshots/portal/nytimes.png index 83a0b23..6bf696c 100644 Binary files a/docs/assets/screenshots/portal/nytimes.png and b/docs/assets/screenshots/portal/nytimes.png differ diff --git a/docs/assets/screenshots/portal/nytimes_article1.png b/docs/assets/screenshots/portal/nytimes_article1.png new file mode 100644 index 0000000..3ab4655 Binary files /dev/null and b/docs/assets/screenshots/portal/nytimes_article1.png differ diff --git a/docs/assets/screenshots/portal/nytimes_article2.png b/docs/assets/screenshots/portal/nytimes_article2.png new file mode 100644 index 0000000..7207a43 Binary files /dev/null and b/docs/assets/screenshots/portal/nytimes_article2.png differ diff --git a/docs/assets/screenshots/portal/spiegel.png b/docs/assets/screenshots/portal/spiegel.png deleted file mode 100644 index 308b6d7..0000000 Binary files a/docs/assets/screenshots/portal/spiegel.png and /dev/null differ diff --git a/docs/assets/screenshots/portal/tagesschau.png b/docs/assets/screenshots/portal/tagesschau.png index bd2b429..87c22fa 100644 Binary files a/docs/assets/screenshots/portal/tagesschau.png and b/docs/assets/screenshots/portal/tagesschau.png differ diff --git a/docs/assets/screenshots/portal/tagesschau_article1.png b/docs/assets/screenshots/portal/tagesschau_article1.png new file mode 100644 index 0000000..c3dcb7e Binary files /dev/null and b/docs/assets/screenshots/portal/tagesschau_article1.png differ diff --git a/docs/assets/screenshots/portal/tagesschau_article2.png b/docs/assets/screenshots/portal/tagesschau_article2.png new file mode 100644 index 0000000..265c564 Binary files /dev/null and b/docs/assets/screenshots/portal/tagesschau_article2.png differ diff --git a/docs/assets/screenshots/portal/tagesschau_context.png b/docs/assets/screenshots/portal/tagesschau_context.png new file mode 100644 index 0000000..6f4192c Binary files /dev/null and b/docs/assets/screenshots/portal/tagesschau_context.png differ diff --git a/docs/assets/screenshots/portal/tagesschau_lifecycle.png b/docs/assets/screenshots/portal/tagesschau_lifecycle.png new file mode 100644 index 0000000..608341c Binary files /dev/null and b/docs/assets/screenshots/portal/tagesschau_lifecycle.png differ diff --git a/docs/assets/screenshots/portal/tagesschau_tag_cloud.png b/docs/assets/screenshots/portal/tagesschau_tag_cloud.png new file mode 100644 index 0000000..7abdb92 Binary files /dev/null and b/docs/assets/screenshots/portal/tagesschau_tag_cloud.png differ diff --git a/docs/assets/screenshots/portal/tagesschau_vs_apollo-news.png b/docs/assets/screenshots/portal/tagesschau_vs_apollo-news.png new file mode 100644 index 0000000..e1e5f9c Binary files /dev/null and b/docs/assets/screenshots/portal/tagesschau_vs_apollo-news.png differ diff --git a/docs/assets/screenshots/rss-feed/updated.jpg b/docs/assets/screenshots/rss-feed/deframed.jpg similarity index 100% rename from docs/assets/screenshots/rss-feed/updated.jpg rename to docs/assets/screenshots/rss-feed/deframed.jpg diff --git a/docs/de/index.md b/docs/de/index.md index 5bdde09..fdef043 100644 --- a/docs/de/index.md +++ b/docs/de/index.md @@ -2,28 +2,28 @@ > :mega: **Hinweis:** Wir suchen einen [Sponsor](sponsors.md), um dieses Projekt in den USA zu hosten. :flag_us: :statue_of_liberty: -Der "News Deframer" ist ein sprachliches Analysetool, für alle Ihre präferierten Nachrichtenseiten. Mit Hilfe von LLMs analysiert es die Nachrichten Schlagzeilen. Die Anwendung besitzt zwei Verwendungsmöglichkeiten: einen **RSS-Feed-Proxy** und ein **Browser-Plugin**. +Der "News Deframer" ist ein sprachliches Analysetool, für alle Ihre präferierten Nachrichtenseiten. Mit Hilfe von LLMs analysiert es die Nachrichten Schlagzeilen.. -## Video +> Ein Werbeblocker blockiert Werbung, die Sie nicht wollen. Der News Deframer neutralisiert die mentale Wirkung von Clickbait, indem er die Portalseite jedes großen Nachrichtennetzwerks durch neutrale Sprache ersetzt. -[![News Deframer Promo](https://img.youtube.com/vi/flORP9WqgSw/maxresdefault.jpg){ width="500" }](https://www.youtube.com/watch?v=flORP9WqgSw&vq=hd1080 "News Deframer Promo"){ .glightbox data-width="100%" data-height="100%" } +## Was wir tun -[:fontawesome-brands-youtube: Auf YouTube anschauen](https://www.youtube.com/watch?v=flORP9WqgSw){ target="_blank" } +- Wir [ersetzen](showcases/index.md) die Portalseite +- Jede Schlagzeile wird durch neutrale Sprache ersetzt (Vermeidung von Clickbait, Reizüberflutung, Überredung und Framing) +- Wir haben eine integrierte [Trendanalyse](trends/index.md) / Erkennung von Talking Points +- Wir können Nachrichten Portale vergleichen, z. B. "Tagesschau" mit der "Apollo News" oder Bild mit dem Bayrischen Rundfunk. +- Ein Klick und Sie erhalten den Originalartikel / die Original-Portalseite zurück. -## Wir ersetzen die Portalseite +| | | +| :---: | :---: | +| Tagesschau| Apollo News | +| [Showcase: Tagesschau](showcases/tagesschau.md) | [Open Showcase: Apollo News](showcases/apollo-news.md) | -Ein Werbeblocker blockiert Werbung, die Sie nicht wollen. Der News Deframer neutralisiert die mentale Wirkung von Clickbait, indem er die Portalseite jedes großen Nachrichtennetzwerks durch neutrale Sprache ersetzt. +## Video -Ein Wert von 50% oder höher deutet auf signifikantes Framing durch Sprache hin. Mit anderen Worten: Sehr wahrscheinlich versucht ein geschulter Journalist Sie mit Worte zu manipulieren und die KI sagt wo und wie. Der Titel oder die Beschreibung sind Clickbait, Framing, Reizüberflutung oder dient einer Agenda. +[![News Deframer Promo](https://img.youtube.com/vi/flORP9WqgSw/maxresdefault.jpg){ width="500" }](https://www.youtube.com/watch?v=flORP9WqgSw&vq=hd1080 "News Deframer Promo"){ .glightbox data-width="100%" data-height="100%" } -| | | -| :---: | :---: | -| **Apollo News** | **Heise** | -| Apollo News | Heise | -| **BBC** | **Tagesschau** | -| BBC | Tagesschau | -| **Spiegel** | **NY Times** | -| Spiegel | NY Times | +[:fontawesome-brands-youtube: Auf YouTube anschauen](https://www.youtube.com/watch?v=flORP9WqgSw){ target="_blank" } ## Was dieses Projekt ist und was nicht @@ -31,18 +31,26 @@ Ein Wert von 50% oder höher deutet auf signifikantes Framing durch Sprache hin. - Dieses Projekt verwendet ein LLM, das als neutraler Journalist operiert, um Inhalte auf Voreingenommenheit zu prüfen und die Einhaltung neutraler Sprache zu analysieren. - Wir verwenden offene [Prompts](https://github.com/deframer/news-deframer/blob/main/pkg/think/prompts) die auf jedem LLM ausgeführt werden können. -## Warum ist eine Sprachanalyse geboten und effektiv +## Sprachanalyse + +Warum Sprachanalyse effektiv : - Wir möchten dabei helfen, die emotionale Wirkung von Schlagzeilen zu vermindern. - Desinformation und Spekulation beruhen oft auf "Dark Patterns, Clickbait und emotionalen Triggern". - Autoren von Desinformation verwenden häufig verschleiernde, reißerische und vage Sprachmittel, um rechtliche Konsequenzen zu vermeiden, aber einen bestimmten Effekt beim Leser hervorzurufen. -**Hinweis**: Es kann zu falsch-positiven / falsch-negativen Ergebnissen kommen. +**WARNUNG**: Durch das LLM **wird** es zu falsch-positiven / falsch-negativen Ergebnissen kommen. Im schlimmsten Fall verpasst (aus versehen) guten Artikel oder ein Clickbait-Artikel rutscht durch. ## Installation Richten Sie Ihre eigene [Instanz](https://github.com/deframer/news-deframer/blob/main/docs/SETUP.md){ target="_blank" } ein. +## Wie es funktioniert + +News Deframer ist ein RSS-Feed-Proxy. Wir beziehen die Schlagzeilen aus dem [RSS](rss-feed.md) eines Portals. +Wir nehmen den Feed und ersetzen dessen Inhalt durch eine neutrale Schlagzeile. Die aktualisierten Daten werden auch für das **Browser-Plugin** verwendet, das +die Portalseite dieser Nachrichtenquelle ersetzt. + ## Chrome Erweiterung Installation der [Chrome Erweiterung](https://chromewebstore.google.com/detail/ffpibngfmnagagggbjpgjbmehhilfinp){ target="_blank" }. diff --git a/docs/de/screenshots/rss-feed.md b/docs/de/rss-feed.md similarity index 85% rename from docs/de/screenshots/rss-feed.md rename to docs/de/rss-feed.md index ab3b598..0e31b47 100644 --- a/docs/de/screenshots/rss-feed.md +++ b/docs/de/rss-feed.md @@ -4,15 +4,15 @@ Dieses Beispiel stammt aus dem Feed `https://rss.nytimes.com/services/xml/rss/ny ## Screenshots -Es wurde `freshrss` verwendet um die Screenshots zu erzeugen. Der "News Deframer" neutralisiert den Ton jedes Artikels und stellt sicher, dass er sich als objektive Nachricht liest. +Es wurde [freshrss](https://www.freshrss.org/){ target="_blank" } verwendet um die Screenshots zu erzeugen. Der "News Deframer" neutralisiert den Ton jedes Artikels und stellt sicher, dass er sich als objektive Nachricht liest. -| Aktualisiert | Original | +| Deframed | Original | | :---: | :---: | -| Aktualisiert | Original | +| Deframed | Original | ## Proxy XML-Feed -Die KI analysiert den Upstream-Inhalt, liefert eine Begründung für ihre Bewertung und führt notwendige Ersetzungen durch, um die Sprache zu entschärfen. +Die KI analysiert den Feed, liefert eine Begründung für ihre Bewertung und erzeugt eine neue Schlagzeile, um die Sprache zu entschärfen. ```xml diff --git a/docs/de/screenshots/bbc.md b/docs/de/showcases/apollo-news.md similarity index 100% rename from docs/de/screenshots/bbc.md rename to docs/de/showcases/apollo-news.md diff --git a/docs/de/screenshots/index.md b/docs/de/showcases/index.md similarity index 84% rename from docs/de/screenshots/index.md rename to docs/de/showcases/index.md index aa48a40..da5fe3b 100644 --- a/docs/de/screenshots/index.md +++ b/docs/de/showcases/index.md @@ -1,9 +1,7 @@ -# Screenshots +# Showcases -## Browser-Plugin - -- [BBC](bbc.md) - [Tagesschau](tagesschau.md) +- [Apollo News](apollo-news.md) ## RSS Feed @@ -14,8 +12,8 @@ Die folgende Konfiguration wurde verwendet, um diese Beispiele zu erstellen: - **Hardware**: Mac Mini M1 (16GB RAM), unter macOS Tahoe 26.2 -- **Software**: [LM Studio](https://lmstudio.ai/) 0.3.39 -- **Modell**: [meta-llama-3.1-8b-instruct](https://huggingface.co/lmstudio-community/Meta-Llama-3.1-8B-Instruct-GGUF) +- **Software**: [LM Studio](https://lmstudio.ai/) 0.4.2 +- **Modell**: [ministral-3-3b](https://huggingface.co/lmstudio-community/Ministral-3-3B-Instruct-2512-GGUF) Das System verwendet diese [Prompts](https://github.com/deframer/news-deframer/tree/main/pkg/think/prompts/). diff --git a/docs/de/screenshots/tagesschau.md b/docs/de/showcases/tagesschau.md similarity index 100% rename from docs/de/screenshots/tagesschau.md rename to docs/de/showcases/tagesschau.md diff --git a/docs/de/trends/index.md b/docs/de/trends/index.md new file mode 100644 index 0000000..486bf1a --- /dev/null +++ b/docs/de/trends/index.md @@ -0,0 +1 @@ +Trends \ No newline at end of file diff --git a/docs/en/index.md b/docs/en/index.md index cef64a4..2fc09cd 100644 --- a/docs/en/index.md +++ b/docs/en/index.md @@ -6,28 +6,28 @@ description: News Deframer will detect journalistic neutrality and framing in ne > :mega: **Note:** We are looking for a [Sponsor](sponsors.md) to host this project in the US. :flag_us: :statue_of_liberty: -News Deframer will detect journalistic neutrality and framing in news articles. By leveraging Large Language Models (LLMs), it analyzes the news headlines. It can act as an **RSS Feed Proxy** or as a **browser plugin**. +News Deframer will detect journalistic neutrality and framing in news articles. By leveraging Large Language Models (LLMs), it analyzes the news headlines. -## Video +> An Ad-Blocker blocks ads you don't want. The News Deframer vaporizes the mental impact of clickbait by replacing the portal page of any major news network with neutral language. -[![News Deframer Promo](https://img.youtube.com/vi/japh9-H29qY/maxresdefault.jpg){ width="500" }](https://www.youtube.com/watch?v=japh9-H29qY&vq=hd1080 "News Deframer Promo"){ .glightbox data-width="100%" data-height="100%" } +## What we do -[:fontawesome-brands-youtube: Watch on YouTube](https://www.youtube.com/watch?v=japh9-H29qY){ target="_blank" } +- We [replace](showcases/index.md) the portal page +- Every Headline is replaced with neutral language (avoiding clickbait, hyper stimulus, persuasion and framing) +- We have build in [Trend Analysis](trends/index.md) / detection of talking points +- You can compare major networks e.g. "The New York Times" with the "New York Post" or CNN with Foxnews. +- One click and you get the original article / original portal page. -## We replace the portal page +| | | +| :---: | :---: | +| The New York Times| New York Post | +| [Open Showcase: The New York Times](showcases/nytimes.md) | [Open Showcase: New York Post](showcases/nypost.md) | -An Ad-Blocker blocks ads you don't want. The News Deframer vaporizes the mental impact of clickbait by replacing the portal page of any major news network with neutral language. +## Video -A score of 50% or higher suggests significant bias. In other words: A trained professional journalist is using words to mess with you and the AI will telly you where and how. The title or the description is clickbait, framing, hyper stimulus or pushing an agenda. +[![News Deframer Promo](https://img.youtube.com/vi/japh9-H29qY/maxresdefault.jpg){ width="500" }](https://www.youtube.com/watch?v=japh9-H29qY&vq=hd1080 "News Deframer Promo"){ .glightbox data-width="100%" data-height="100%" } -| | | -| :---: | :---: | -| **Apollo News** | **Heise** | -| Apollo News | Heise | -| **BBC** | **Tagesschau** | -| BBC | Tagesschau | -| **Spiegel** | **NY Times** | -| Spiegel | NY Times | +[:fontawesome-brands-youtube: Watch on YouTube](https://www.youtube.com/watch?v=japh9-H29qY){ target="_blank" } ## What this project is and is not @@ -35,18 +35,26 @@ A score of 50% or higher suggests significant bias. In other words: A trained pr - This project uses an LLM acting as a neutral journalist to analyze content for bias and adherence to neutral language. - We use open transparent [prompts](https://github.com/deframer/news-deframer/blob/main/pkg/think/prompts) that can be run on any LLM. -## Why is language analysis effective +## Language analysis + +Why language analysis is effective - We aim to help you avoid engaging with questionable headlines. - Misinformation and speculation often rely on dark patterns, clickbait, and emotional triggers. - Authors of misinformation often use disguise and vague language to avoid legal repercussions. -**WARNING**: We can have false positives / negatives. +**WARNING**: We **will** have false positives / negatives. Worst case - you don't read an article of your favorite news source or clickbait article slips through. ## Installation Set up your own [instance](https://github.com/deframer/news-deframer/blob/main/docs/SETUP.md){ target="_blank" }. +## How it works. + +News deframer is basically a drop in replacement RSS Feed proxy. We get the headlines from the [RSS](rss-feed.md) of a portal. +We take the feed and replace it's content with a deframed version. The updated data is also used for the **browser plugin** that +replace the portal of this news source. + ## Chrome Extension Install the [Chrome Extension](https://chromewebstore.google.com/detail/ffpibngfmnagagggbjpgjbmehhilfinp){ target="_blank" }. diff --git a/docs/en/screenshots/rss-feed.md b/docs/en/rss-feed.md similarity index 90% rename from docs/en/screenshots/rss-feed.md rename to docs/en/rss-feed.md index 17be77f..a8c1373 100644 --- a/docs/en/screenshots/rss-feed.md +++ b/docs/en/rss-feed.md @@ -4,11 +4,11 @@ This example is derived from the `https://rss.nytimes.com/services/xml/rss/nyt/W ## Screenshots -The item is rendered by `freshrss`. Deframer neutralizes the tone of every article, ensuring it reads like objective news. +The item is rendered by [freshrss](https://www.freshrss.org/){ target="_blank" }. Deframer neutralizes the tone of every article, ensuring it reads like objective news. -| Updated | Original | +| Deframed | Original | | :---: | :---: | -| Updated | Original | +| Deframed | Original | ## Proxy XML Feed diff --git a/docs/en/screenshots/tagesschau.md b/docs/en/screenshots/nypost.md similarity index 100% rename from docs/en/screenshots/tagesschau.md rename to docs/en/screenshots/nypost.md diff --git a/docs/en/screenshots/bbc.md b/docs/en/screenshots/nytimes.md similarity index 100% rename from docs/en/screenshots/bbc.md rename to docs/en/screenshots/nytimes.md diff --git a/docs/en/screenshots/index.md b/docs/en/showcases/index.md similarity index 82% rename from docs/en/screenshots/index.md rename to docs/en/showcases/index.md index 37cfba6..4ca529f 100644 --- a/docs/en/screenshots/index.md +++ b/docs/en/showcases/index.md @@ -2,8 +2,8 @@ ## Browser Plugin -- [BBC](bbc.md) -- [Tagesschau](tagesschau.md) +- [The New York Times](nytimes.md) +- [New York Post](nypost.md) ## RSS Feed @@ -14,8 +14,8 @@ The following setup was used to generate these examples: - **Hardware**: Mac Mini M1 (16GB RAM), running macOS Tahoe 26.2 -- **Software**: [LM Studio](https://lmstudio.ai/) 0.3.39 -- **Model**: [meta-llama-3.1-8b-instruct](https://huggingface.co/lmstudio-community/Meta-Llama-3.1-8B-Instruct-GGUF) +- **Software**: [LM Studio](https://lmstudio.ai/) 0.4.2 +- **Modell**: [ministral-3-3b](https://huggingface.co/lmstudio-community/Ministral-3-3B-Instruct-2512-GGUF) The system utilizes these [Prompts](https://github.com/deframer/news-deframer/tree/main/pkg/think/prompts/). diff --git a/docs/en/showcases/nypost.md b/docs/en/showcases/nypost.md new file mode 100644 index 0000000..cfbb346 --- /dev/null +++ b/docs/en/showcases/nypost.md @@ -0,0 +1 @@ +wefwefwwef \ No newline at end of file diff --git a/docs/en/showcases/nytimes.md b/docs/en/showcases/nytimes.md new file mode 100644 index 0000000..db182b2 --- /dev/null +++ b/docs/en/showcases/nytimes.md @@ -0,0 +1 @@ +wfwefwef \ No newline at end of file diff --git a/docs/en/trends/index.md b/docs/en/trends/index.md new file mode 100644 index 0000000..486bf1a --- /dev/null +++ b/docs/en/trends/index.md @@ -0,0 +1 @@ +Trends \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 37805c6..4251d40 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -44,8 +44,10 @@ plugins: build: true nav: - News Deframer: index.md - - Screenshots: screenshots/index.md + - Showcases: showcases/index.md + - Trends: trends/index.md - Status: todo.md + - RSS Proxy: rss-feed.md - Sponsors: sponsors.md - Links: links.md - License: license.md @@ -55,8 +57,10 @@ plugins: build: true nav: - News Deframer: index.md - - Screenshots: screenshots/index.md + - Showcases: showcases/index.md + - Trends: trends/index.md - Status: todo.md + - RSS Proxy: rss-feed.md - Sponsoren: sponsors.md - Links: links.md - Lizenz: license.md diff --git a/overrides/js/language-detect.js b/overrides/js/language-detect.js index a5911de..c2e78ac 100644 --- a/overrides/js/language-detect.js +++ b/overrides/js/language-detect.js @@ -1,19 +1,19 @@ -(function() { - var langs = ['de'], def = 'en', p = location.pathname, s = localStorage; - var browser = (navigator.language || '').slice(0, 2); +(function () { + // var langs = ['de'], def = 'en', p = location.pathname, s = localStorage; + // var browser = (navigator.language || '').slice(0, 2); - for (var i = 0; i < langs.length; i++) { - if (p.indexOf('/' + langs[i] + '/') === 0) return s.setItem('lp', langs[i]); - } + // for (var i = 0; i < langs.length; i++) { + // if (p.indexOf('/' + langs[i] + '/') === 0) return s.setItem('lp', langs[i]); + // } - if (p === '/' || p === '/index.html') { - for (var i = 0; i < langs.length; i++) { - if (document.referrer.indexOf('/' + langs[i] + '/') !== -1) return s.setItem('lp', def); - } + // if (p === '/' || p === '/index.html') { + // for (var i = 0; i < langs.length; i++) { + // if (document.referrer.indexOf('/' + langs[i] + '/') !== -1) return s.setItem('lp', def); + // } - var target = s.getItem('lp'); - if (!target && langs.indexOf(browser) !== -1) target = browser; + // var target = s.getItem('lp'); + // if (!target && langs.indexOf(browser) !== -1) target = browser; - if (target && target !== def) location.href = '/' + target + '/'; - } + // if (target && target !== def) location.href = '/' + target + '/'; + // } })();