Advanced Filters - Mobile

Advanced Filters - Mobile

Sep 30, 2025

Due to mobile browsers have a ~5000 character limit (at least Android Chrome does), the desktop bookmarklet needed to be split in 2 parts. The 1st one adds the additional checkmark filters. The 2nd one adds the Categories filters and the sort-by-wishlist-discount sort option. License highlighting and filtering only work on the desktop version.

Each bookmarklet works on its own, so only run one of them if you don't need the other. If you run them both, the order in which you trigger them doesn't matter.

For info on how to rearrange or configure the options, refer to steps 3 and 4 of the Advanced Filters - Desktop post.

1. New checkmark filters bookmarklet:

javascript:(()=>{ const filterOpts=[
[],
["owned","noDazPlus","noBundle","pa","do","nonFigure"],
["idRange","priceRange","noNew","onlyNew"],
];
if("www.daz3d.com"===location.host)try{const e=window,t=document,n=!1,a=void 0,{filters:i,hasLoaded:r}=daz?.filter||{};if(r){const r=(e,n={},a="")=>{const i=t.createElement(e);for(let e in n)i.style[e]=n[e];return i.className=a,i},l=(e,n=t)=>n.querySelector(`[id=${e}]`),o=(e,n=t)=>n?.getElementsByClassName(e),s=(e,n=t)=>n?.getElementsByTagName(e),c=e=>[].slice.call(e),d=()=>{const e={set:a,filter:t=>e.set.has(t)};return e},{compat_figures:p,owned:u}=i,h=Object.keys(dazPricing),y=e=>s("input",e)?.[0],_=e=>Array.isArray(e)?e:"object"==typeof e?Object.keys(e).map(e=>parseInt(e)):DazFilter.prototype.unpackBuffer(e),f=e.innerWidth<992,g="/wishlist"===location.pathname,w=g?l(f?"collapsible-product-filters-container":"collapsible-product-display-container"):t,b=l("large_owned",w)?.parentNode;if(b&&!l("show_owned_only")){const t=g?daz.wishlistdisplay:daz.catalog;if(g){const e=r("div"),t=b.parentNode;t.insertBefore(e,b),t.style.height="auto",t.style.marginBottom="20px",e.setAttribute("style",b.getAttribute("style")),b.removeAttribute("style"),e.appendChild(b),e.style.display="flex",e.style.flexDirection="column",o("desktop-sort-by")[0].style.marginLeft="auto"}const s=[b],m=(e,t)=>{e&&e.checked!==t&&(e.checked=t,e.dispatchEvent(new Event("change")))},k=()=>{const e=s[0].parentNode,t=r("div",g&&f?{marginTop:"-10px"}:{},s[0].className);return e.insertBefore(t,s.at(-1).nextSibling),s.push(t),t};let x=0;const E=(e,t,n,i=null,l)=>{x++;const o=r("span",{},"cursor-pointer filter-checkbox"),c=r("label"),d=r("input"),p=r("span");o.id=e,o.appendChild(c),c.appendChild(d),c.appendChild(p),p.innerText=` ${t}`,d.type="checkbox",d.onchange=()=>n(d.checked),i||(i=s.at(-1)),i.appendChild(o);let u=a;return l&&(u=r("input",{width:"number"==typeof l?`${l}px`:"100px",minWidth:"auto",marginTop:"-2px",marginBottom:"-4px",marginLeft:"6px",height:"28px"}),o.appendChild(u),o.style.display="inline-flex"),{input:d,textField:u}},v=e.__productList=e.__productList||t?.productList?.map(e=>parseInt(e));e.__activeFilters||(e.__activeFilters=[]);const z=(e,t=!0)=>{const n=new Set;if("Set"===e?.constructor?.name)return t?new Set(h.map(e=>parseInt(e))).difference(e):e;const a=Array.isArray(e)?e:[e];let i={};return a.forEach(e=>{if(Array.isArray(e)||"object"!=typeof e){_(e).forEach(e=>{i[e]=!0})}else i={...i,...e}}),t?h.forEach(e=>{i[e]||n.add(parseInt(e))}):h.forEach(e=>{i[e]&&n.add(parseInt(e))}),n},F=()=>{let n=v;e.__activeFilters.forEach(({filter:e})=>{n=n.filter(e)}),t.productList=n,t.applyFilters(!0)},N=t=>{e.__activeFilters=e.__activeFilters.filter(e=>e!==t)},O=e=>y(l(e,w)),A=(t,i,r,l,o=d(),s=a,c=[],p=n)=>{const u=o;let h=[];const{textField:y}=E(t,i,t=>{const a=()=>{t?(h=[],c.forEach(e=>{const t=O(e);t?.checked&&(p&&h.push(t),m(t,n))}),e.__activeFilters.push(u)):(h.forEach(e=>m(e,!0)),N(u)),F()};l?"function"==typeof r?r(e=>{u.set=e,a()},y.value):(u.filter=u.updateFilter(y.value),a()):(u.set||("function"==typeof r?r(e=>{u.set=e}):u.set=z(r,s)),a())},a,l)},B=_(i.bundle.yes),C=e=>{switch(e){case"owned":A("show_owned_only","Only Owned",u,n,a,n,["large_owned","large_wishlist"],!0);break;case"noDazPlus":A("hide_daz_plus","Hide Daz+",i.platClub.yes,n,a,a,["large_platClub"]);break;case"pa":A("hide_daz_original","PA Only",i.vendor["Daz Originals"],n,a,a,["only_daz_original"]);break;case"do":A("only_daz_original","DO Only",i.vendor["Daz Originals"],n,a,n,["hide_daz_original"]);break;case"noBundle":A("hide_bundles","No Bundles",[B],n,a,a,["large_bundle"]);break;case"nonFigure":A("hide_figure","Non-Figure",[].concat(...Object.keys(p).map(e=>p[e])));break;case"noNew":A("no_new","Hide New",i.new.yes,n,a,a,["only_new"]);break;case"onlyNew":A("only_new","New Only",i.new.yes,n,a,n,["no_new"]);break;case"idRange":A("custom_id_range","ID Range",null,80,{updateFilter:e=>{const[t=0,n=1/0]=e.split("-");return e=>e>=t&&e<=n}});break;case"priceRange":A("custom_price_range","Price Range",null,80,{updateFilter:e=>{const[t=0,n=1/0]=e.split("-");return e=>{const a=dazPricing[e];return a>=t&&a<=n}}})}};filterOpts.forEach((e,t,n)=>{e.forEach(e=>C(e)),t!==n.length-1&&k()});const L=(e,t)=>{const a=O(e);a?.addEventListener("click",()=>{t.forEach(e=>{m(O(e),n)})})};let D,P;if(L("large_platClub",["hide_daz_plus"]),L("large_owned",["show_owned_only"]),L("large_wishlist",["show_owned_only"]),L("large_bundle",["hide_bundles"]),c(o("hideable-product-filters")).forEach(e=>e.classList.contains("filter-checkboxes")?D=e:P=e),D&&P){const t=()=>{e.innerWidth<992?(D.style.setProperty("display","block","important"),P.style.marginTop=`${26+D.clientHeight}px`,D.style.display=""):P.style.marginTop=""};["max-width:576","min-width:992"].forEach(n=>e.matchMedia(`(${n}px)`).addEventListener("change",t)),t()}}}}catch(e){console.log("error",e)} })()

2. Adds the updated Categories filter section, and wishlist discount sort. (Note: use long tap to enable negative filtering in the Categories filters):

javascript:(()=>{ let settings={
useCategories:1,
wishlistDiscountSort:1,
autoSortWishlist:1,
};
if("www.daz3d.com"===location.host)try{let e=window,t=document,i=!1,{filters:l,sorts:r,rawCategories:s,hasLoaded:n}=daz?.filter||{};if(n){let n=(e,t={},i="")=>{let l=document.createElement(e);for(let e in t)l.style[e]=t[e];return l.className=i,l},a=(e,i=t)=>i.querySelector(`[id=${e}]`),o=(e,i=t)=>i?.getElementsByClassName(e),c=(e,i=t)=>i?.getElementsByTagName(e),{shopCategories:d={}}=l,{useCategories:p,wishlistDiscountSort:u,autoSortWishlist:h}=settings,f=e=>Array.isArray(e)?e:"object"==typeof e?Object.keys(e).map(e=>parseInt(e)):DazFilter.prototype.unpackBuffer(e),m=e.innerWidth<992,g="/wishlist"===location.pathname,y=g?a(m?"collapsible-product-filters-container":"collapsible-product-display-container"):t;if(y&&!e.__ran2nd){let t=g?daz.wishlistdisplay:daz.catalog,m=e.__productList=e.__productList||t?.productList?.map(e=>parseInt(e)),b=()=>e.__activeFilters;b()||(e.__activeFilters=[]),e.__ran2nd=!0;let _=()=>{let e=m;b().map(({filter:t})=>{e=e.filter(t)}),t.productList=e,t.applyFilters(!0)},w=t=>{e.__activeFilters=b().filter(e=>e!==t)},S=f(l.bundle.yes),C=e=>{let t=localStorage.getItem(e);return t&&JSON.parse(t)};u&&(async()=>{let s=y.querySelector("select[name=sort-by]");if(s){let a=C("__fullPrices")||{},o={},c=i,d=async t=>{if(14548==t)return void(o[t]=-1);let i=dazPricing[t],l=e.loadedSlabs[t];if(!l){if(void 0!==a[t])return void(o[t]=a[t]?Math.round(100*(1-i/a[t])):1);l=fetch(`/dazApi/slab/${t}`).then(e=>e.json()),e.loadedSlabs[t]=l}let r=await l;if(r){let{prices:e,isDisabled:l}=r;if(!e||l)o[t]=-2;else{let l=parseInt(e.USD.replace(".",""));c||=a[t]!==l,a[t]=l,o[t]=Math.round(100*(1-i/a[t]))}}},p=f(l.inWishlist),u=new Set(m),g=p.filter(e=>u.has(e)),y=new Set(g);if(g.length){let e=n("option");e.setAttribute("data-sortdata","wlpercentoff"),e.setAttribute("data-sortdir","1"),e.innerText="Wishlist % Off",s.appendChild(e);let[l,p]=t.sortOrderSettings,u=r[l]||r[Object.keys(r)[0]];await Promise.all(g.map(e=>d(e))),c&&(localStorage.setItem("__fullPrices",JSON.stringify(a)),c=i);let f=e=>void 0!==u[e]?u[e]:999999999-e*p,b=1==p?(e,t)=>f(e)-f(t):(e,t)=>f(t)-f(e),_=g.sort((e,t)=>o[t]-o[e]||b(e,t)),w=m.filter(e=>!y.has(e)).sort(b),S={};[..._,...w].map((e,t)=>{S[e]=t}),r.wlpercentoff=S,h&&(s.selectedIndex=s.length-1,s.dispatchEvent(new Event("change")))}}})(),p&&(()=>{let e,t,l;if(Object.keys(d).length>0)localStorage.setItem("__shopCategories",JSON.stringify(d,(e,t)=>["children","products"].includes(e)?void 0:t));else if(d=C("__shopCategories"),!d)return;let r=o("scroll-container",a("shopCategoriesList"))?.[0];if(r)l=n(r.tagName,{},r.className),r.hasAttribute("style")&&l.setAttribute("style",r.getAttribute("style")),r.replaceWith(l);else{let r=o("product-filter-section")[0];if(!r)return;let s=n(r.tagName,{},r.className);s.innerHTML=r.innerHTML,r.parentNode.insertBefore(s,r),[e,t]=s.children,c("h4",e)[0].innerText="Categories";let a=i;e.onclick=()=>{let[i,l]=a?["none","block"]:["block","none"];o("fd-plus",e)[0].style.display=l,t.style.display=o("fd-minus",e)[0].style.display=i,a=!a},t.id="__CustomCategories",t.innerText="",l=n("div",{},"scroll-container"),t.appendChild(l)}let p=n("ul");l.appendChild(p);let u,h,g=i,y=[],v=[],k=e=>{let t=e[0];for(let i=1;i<e.length;i++)t=t.union(e[i]);return t},T={filter:e=>(!u||u.has(e))&&(!h||!h.has(e))},N={},x=(e,t)=>{if(N[e])return N[e];let{products:i=[],children:l=[]}=s[e]||{},r=new Set(f(i));return l.map(e=>{r=r.union(x(e))}),t&&(r=r.difference(t)),N[e]=r,r},L=(e,t,l,r)=>{let s=n("li",{},"filter_visible js-filter-option-container"+(l?"":" bs5-ps-3")),a=n("label",{},"cursor-pointer item-label"),o=n("input");o.type="checkbox",o.id=e;let c=n("span",{},"idx");return s.appendChild(a),a.appendChild(o),a.appendChild(c),"invert"===e?(c.innerHTML=`<b>${t}</b>`,o.onchange=()=>{T.filter=o.checked?missing:has,_()}):(c.innerText=t,((e,t,l)=>{let r,s=0,n=[i,!0,null],a=t=>{clearTimeout(r),r=0,s=t?2===s?0:2:s?0:1,e.checked=1===s,e.indeterminate=2===s,l&&l(n[s])},o="addEventListener";e[o]("click",e=>e.preventDefault()),t[o]("pointerdown",()=>r=setTimeout(()=>a(!0),500)),t[o]("pointerleave",()=>clearTimeout(r)),t[o]("pointerup",()=>r&&a())})(o,a,t=>{let l=x(e);t?(y.push(l),u=k(y)):null===t?(y=y.filter(e=>e!==l),u=k(y),v.push(l),h=k(v)):(y=y.filter(e=>e!==l),u=k(y),v=v.filter(e=>e!==l),h=k(v)),u||h?g||(g=!0,b().push(T)):(g=i,w(T)),_()})),r.appendChild(s),s},O=-100,I={id:O},j=[];s[O]={children:j};let z=new Set(S),A=[];Object.keys(s).map(e=>{let{name:t}=s[e];/texture/i.test(t)&&(s[--O]=s[e],j.push(O),A.push({id:O,name:t}),x(O,z))}),I.childrenInfo=A.sort((e,t)=>e.name.localeCompare(t.name));let $=new Set(m),D=e=>$.intersection(x(e)).size,E=(e,{id:t,childrenInfo:l=[]})=>{let r=L(t,`${e} (${D(t)})`,!0,p);l.map(({id:e,name:t,products:l})=>{let s=l||D(e);s&&L(e,`${t} (${s})`,i,r)})},W=i;Object.keys(d).map(e=>{e>"Textures"&&!W&&(W=!0,E("Textures",I)),E(e,d[e])})})()}}}catch(e){console.log(e)} })()

3. To run bookmarklets on Android Chrome (I assume other mobile browser are similar), you need to type the name given to the bookmarklet in the address bar and then tap it when you see it. It also might not show up as a top suggestion, so you may need to scroll a bit to find it. Hence, consider giving the bookmarklets a unique name to make them easy to find.

Enjoy!

Gefällt dir dieser Beitrag?

Kaufe Utiltarian einen Kaffee

Mehr von Utiltarian

DatenschutzNutzungsbedingungenMelden