Commit a0dfbbb8 authored by Santhanavanich's avatar Santhanavanich
Browse files

add filter

parent f0e1698a
Pipeline #11120 passed with stage
in 31 seconds
Showing with 7 additions and 3 deletions
+7 -3
var urlKeyword, urlParams; var urlKeyword, urlAuthor, urlParams;
urlParams = new URLSearchParams(window.location.search); urlParams = new URLSearchParams(window.location.search);
urlKeyword = urlParams.get('keyword'); urlKeyword = urlParams.get('keyword');
urlAuthor = urlParams.get('author');
function addcontent(item) { function addcontent(item) {
var lang_cont_person = "" var lang_cont_person = ""
var lang_keywords = "" var lang_keywords = ""
...@@ -8,9 +10,11 @@ function addcontent(item) { ...@@ -8,9 +10,11 @@ function addcontent(item) {
if (item === undefined) { if (item === undefined) {
} else if (urlKeyword == null || (item.item.keywords.includes(urlKeyword))) { } else if ((urlKeyword == null || item.item.keywords.includes(urlKeyword)) &&
(urlAuthor == null ||
item.item.author.firstName.toLowerCase().includes(urlAuthor.toLowerCase()) ||
item.item.author.lastName.toLowerCase().includes(urlAuthor.toLowerCase()))) {
// Prepare YouTube Link // Prepare YouTube Link
// var array_contains_youtube = true // var array_contains_youtube = true
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment